yocto
Yocto's logging functions (Python, shell)
chanbae
2024. 11. 25. 00:17
Yocto provides logging functions in both Python and shell to help you log when debugging. In this article, we will briefly introduce the types of logging functions and the similar but slightly different Python and shell logging functions.
Types of logging functions
- python: bb.fatal, bb.error, bb.wran, bb.note, bb.plain, bb.debug
- shell script: bbfatal, bberror, bbwarn, bbnote, bbplain, bbdebug
Function name | Description |
bb.fatal, bbfatal | message and abort the build. |
bb.error, bberror | It outputs an error but doesn't break the build. |
bb.warn, bbwarn | Print only a warning message. |
bb.note, bbnote | Print a message for the user's information. |
bb.plain, bbplain | Print a message |
bb.debug, bbdebug | Add debugging information that is displayed based on the debug level. |
Differences between Python and shell logging functions
- Python logging functions: Viewable directly in the console and stored in the execution log inside build/tmp/log/cooker/<machine>.
- Shell script logging functions: Output to individual task logs, this information can be found in each task log file in the build/tmp/work/<arch>/<recipe name>/<software version>/temp directory
As you can see, there are different places to view the final logging results, so it's important to be familiar with them and use them for debugging purposes.