From ed0a240e1632682ec4c33341f3e24ad71773cdfc Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Tue, 11 Dec 2012 12:07:58 -0600 Subject: 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 Signed-off-by: Richard Purdie --- .../html/poky-ref-manual/logging-with-python.html | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 documentation/ref-manual/eclipse/html/poky-ref-manual/logging-with-python.html (limited to 'documentation/ref-manual/eclipse/html/poky-ref-manual/logging-with-python.html') diff --git a/documentation/ref-manual/eclipse/html/poky-ref-manual/logging-with-python.html b/documentation/ref-manual/eclipse/html/poky-ref-manual/logging-with-python.html new file mode 100644 index 0000000000..e57b647148 --- /dev/null +++ b/documentation/ref-manual/eclipse/html/poky-ref-manual/logging-with-python.html @@ -0,0 +1,45 @@ + + + +2.3.7.1. Logging With Python + + + + + + + +
+

+2.3.7.1. Logging With Python

+

+ 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. +

+

+ Following is an example written in Python. + The code handles logging for a function that determines the number of tasks + needed to be run: +

+
+     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")
+     }
+                
+

+

+
+ -- cgit v1.2.3-54-g00ecf