documentation: Rename of poky-ref-manual folder to ref-manual.

Changing the folder that holds the YP Reference Manual to be
"ref-manual".  This will help with confustion over the manual's
intended purpose.

(From yocto-docs rev: 1106442964b5080cb0b6b3bd3af32e9407c0f7c1)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark
2012-12-11 12:07:58 -06:00
committed by Richard Purdie
parent af19d889ef
commit ed0a240e16
214 changed files with 26016 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>2.3.7.1.<2E>Logging With Python</title>
<link rel="stylesheet" type="text/css" href="../book.css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="The Yocto Project Reference Manual">
<link rel="up" href="recipe-logging-mechanisms.html" title="2.3.7.<2E>Recipe Logging Mechanisms">
<link rel="prev" href="recipe-logging-mechanisms.html" title="2.3.7.<2E>Recipe Logging Mechanisms">
<link rel="next" href="logging-with-bash.html" title="2.3.7.2.<2E>Logging With Bash">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="section" title="2.3.7.1.<2E>Logging With Python">
<div class="titlepage"><div><div><h4 class="title">
<a name="logging-with-python"></a>2.3.7.1.<2E>Logging With Python</h4></div></div></div>
<p>
When creating recipes using Python and inserting code that handles build logs
keep in mind the goal is to have informative logs while keeping the console as
"silent" as possible.
Also, if you want status messages in the log use the "debug" loglevel.
</p>
<p>
Following is an example written in Python.
The code handles logging for a function that determines the number of tasks
needed to be run:
</p>
<pre class="literallayout">
python do_listtasks() {
bb.debug(2, "Starting to figure out the task list")
if noteworthy_condition:
bb.note("There are 47 tasks to run")
bb.debug(2, "Got to point xyz")
if warning_trigger:
bb.warn("Detected warning_trigger, this might be a problem later.")
if recoverable_error:
bb.error("Hit recoverable_error, you really need to fix this!")
if fatal_error:
bb.fatal("fatal_error detected, unable to print the task list")
bb.plain("The tasks present are abc")
bb.debug(2, "Finished figuring out the tasklist")
}
</pre>
<p>
</p>
</div></body>
</html>