Book Image

Embedded Linux Development with Yocto Project

Book Image

Embedded Linux Development with Yocto Project

Overview of this book

Table of Contents (22 chapters)
Embedded Linux Development with Yocto Project
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
References
Index

Logging information during task execution


The logging utilities provided by BitBake are very useful to trace the code execution path. BitBake provides logging functions for use in Python and Shell Script code, as described:

  • Python: For use within Python functions, BitBake supports several log levels, which are bb.fatal, bb.error, bb.warn, bb.note, bb.plain, and bb.debug

  • Shell Script: For use in Shell Script functions, the same set of log levels exists and is accessed with a similar syntax: bbfatal, bberror, bbwarn, bbnote, bbplain, and bbdebug

These logging functions are very similar to each other but have inner differences as described:

  • bb.fatal and bbfatal: These have the highest priority of logging messages as they print the message and terminate the processing. They cause the build to be interrupted.

  • bb.error and bberror: They are used to display an error but do not force the build to stop.

  • bb.warn and bbwarn: They are used to warn users about something.

  • bb.note and bbnote: These add...