Best practices exist while writing recipes that both log build progress and act on build conditions such as warnings and errors. Both Python and Bash language bindings exist for the logging mechanism:
Python: For Python functions, BitBake
supports several loglevels: bb.fatal
,
bb.error
, bb.warn
,
bb.note
, bb.plain
,
and bb.debug
.
Bash: For Bash functions, the same set
of loglevels exist and are accessed with a similar syntax:
bbfatal
, bberror
,
bbwarn
, bbnote
,
bbplain
, and bbdebug
.
For guidance on how logging is handled in both Python and Bash recipes, see the
logging.bbclass
file in the
meta/classes
folder of the
Source Directory.