mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
documentation/poky-ref-manual/usingpoky.xml: Edits per Darren Hart
Darren provided me with some feedback on the logging mechanism section for both Python and Bash. (From yocto-docs rev: 7dddadf8caba01d3ef1046be52a1435eeaed60a3) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
0d6dc5c2c0
commit
31acde62ad
@@ -384,14 +384,14 @@
|
|||||||
and <filename>bb.debug</filename>.</para></listitem>
|
and <filename>bb.debug</filename>.</para></listitem>
|
||||||
<listitem><para><emphasis>Bash:</emphasis> For Bash functions, the same set
|
<listitem><para><emphasis>Bash:</emphasis> For Bash functions, the same set
|
||||||
of loglevels exist and are accessed with a similar syntax:
|
of loglevels exist and are accessed with a similar syntax:
|
||||||
<filename>bb.fatal</filename>, <filename>bb.error</filename>,
|
<filename>bbfatal</filename>, <filename>bberror</filename>,
|
||||||
<filename>bb.warn</filename>, <filename>bb.note</filename>,
|
<filename>bbwarn</filename>, <filename>bbnote</filename>,
|
||||||
<filename>bb.plain</filename>, and <filename>bb.debug</filename>.</para></listitem>
|
<filename>bbplain</filename>, and <filename>bbdebug</filename>.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
For guidance on <filename>echo</filename> how logging is handled
|
For guidance on how logging is handled
|
||||||
in both Python and Bash recipes, see the
|
in both Python and Bash recipes, see the
|
||||||
<filename>logging.bbclass</filename> file in the
|
<filename>logging.bbclass</filename> file in the
|
||||||
<filename>meta/classes</filename> directory of the Yocto Project files.
|
<filename>meta/classes</filename> directory of the Yocto Project files.
|
||||||
@@ -407,7 +407,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Following is sample code from a recipe written in Python.
|
Following is an example written in Python.
|
||||||
The code handles logging for a function that determines the number of tasks
|
The code handles logging for a function that determines the number of tasks
|
||||||
needed to be run:
|
needed to be run:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
@@ -439,7 +439,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Following is sample code from a recipe written in Bash.
|
Following is an example written in Bash.
|
||||||
The code logs the progress of the <filename>do_my_function</filename> function.
|
The code logs the progress of the <filename>do_my_function</filename> function.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
do_my_function() {
|
do_my_function() {
|
||||||
@@ -449,15 +449,15 @@
|
|||||||
fi
|
fi
|
||||||
bbdebug 2 "Got to point xyz"
|
bbdebug 2 "Got to point xyz"
|
||||||
if [ warning_trigger ]; then
|
if [ warning_trigger ]; then
|
||||||
warn "Detected warning_trigger, this might cause a problem later."
|
bbwarn "Detected warning_trigger, this might cause a problem later."
|
||||||
fi
|
fi
|
||||||
if [ recoverable_error ]; then
|
if [ recoverable_error ]; then
|
||||||
error "Hit recoverable_error, correcting"
|
bberror "Hit recoverable_error, correcting"
|
||||||
fi
|
fi
|
||||||
if [ fatal_error ]; then
|
if [ fatal_error ]; then
|
||||||
fatal "fatal_error detected"
|
bbfatal "fatal_error detected"
|
||||||
fi
|
fi
|
||||||
debug 2 "Completed do_my_function"
|
bbdebug 2 "Completed do_my_function"
|
||||||
}
|
}
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|||||||
Reference in New Issue
Block a user