1 # The following logging mechanisms are to be used in bash functions of recipes.
2 # They are intended to map one to one in intention and output format with the
3 # python recipe logging functions of a similar naming convention: bb.plain(),
4 # bb.note(), etc.
5
6 LOGFIFO = "${T}/fifo.${@os.getpid()}"
7
8 # Print the output exactly as it is passed in. Typically used for output of
9 # tasks that should be seen on the console. Use sparingly.
10 # Output: logs console
11 bbplain() {
12 +-- 6 lines: if [ -p ${LOGFIFO} ] ; then-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
18
19 # Notify the user of a noteworthy condition.
20 # Output: logs
21 bbnote() {
22 +-- 7 lines: if [ -p ${LOGFIFO} ] ; then-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
29 # Print a warning to the log. Warnings are non-fatal, and do not
30 # indicate a build failure.
31 # Output: logs console
32 bbwarn() {
33 +-- 7 lines: if [ -p ${LOGFIFO} ] ; then-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
40 # Print an error to the log. Errors are non-fatal in that the build can
41 # continue, but they do indicate a build failure.
42 # Output: logs console
43 bberror() {
44 +-- 6 lines: if [ -p ${LOGFIFO} ] ; then-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
50
51 # Print a fatal error to the log. Fatal errors indicate build failure
52 # and halt the build, exiting with an error code.
53 # Output: logs console
54 bbfatal() {
55 +-- 7 lines: if [ -p ${LOGFIFO} ] ; then-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
62
63 # Like bbfatal, except prevents the suppression of the error log by
64 # bitbake's UI.
65 # Output: logs console
66 bbfatal_log() {
67 +-- 7 lines: if [ -p ${LOGFIFO} ] ; then-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
74
75 # Print debug messages. These are appropriate for progress checkpoint
76 # messages to the logs. Depending on the debug log level, they may also
77 # go to the console.
78 # Output: logs console
79 # Usage: bbdebug 1 "first level debug message"
80 # bbdebug 2 "second level debug message"
81 bbdebug() {
82 +-- 19 lines: USAGE='Usage: bbdebug [123] "message"'--------------------------------------------------------------------------------------------------------------------------------------------------------------
101
base.bbclass 详细分析 —— logging.bbclass
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 1 设置 NATIVELSBSTRING ORIGNATIVELSBSTRING BB_VERSION 2 hos...
- Handle backfilling Handle PACKAGECONFIG 用到的方法 根据PACKAGECO...
- task chain 构建 base.class patch.bbclass staging.bbclass ut...