base.bbclass 詳細分析 —— logging.bbclass

  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 
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末于游,一起剝皮案震驚了整個濱河市致燥,隨后出現(xiàn)的幾起案子沿侈,更是在濱河造成了極大的恐慌驱犹,老刑警劉巖,帶你破解...
    沈念sama閱讀 218,284評論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件斑唬,死亡現(xiàn)場離奇詭異败许,居然都是意外死亡柑潦,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,115評論 3 395
  • 文/潘曉璐 我一進店門锈遥,熙熙樓的掌柜王于貴愁眉苦臉地迎上來纫事,“玉大人,你說我怎么就攤上這事所灸±龌蹋” “怎么了?”我有些...
    開封第一講書人閱讀 164,614評論 0 354
  • 文/不壞的土叔 我叫張陵爬立,是天一觀的道長钾唬。 經(jīng)常有香客問我,道長懦尝,這世上最難降的妖魔是什么知纷? 我笑而不...
    開封第一講書人閱讀 58,671評論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮陵霉,結果婚禮上琅轧,老公的妹妹穿的比我還像新娘。我一直安慰自己踊挠,他們只是感情好乍桂,可當我...
    茶點故事閱讀 67,699評論 6 392
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著效床,像睡著了一般睹酌。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上剩檀,一...
    開封第一講書人閱讀 51,562評論 1 305
  • 那天憋沿,我揣著相機與錄音,去河邊找鬼沪猴。 笑死辐啄,一個胖子當著我的面吹牛采章,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播壶辜,決...
    沈念sama閱讀 40,309評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼悯舟,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了砸民?” 一聲冷哼從身側響起抵怎,我...
    開封第一講書人閱讀 39,223評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎岭参,沒想到半個月后反惕,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,668評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡冗荸,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,859評論 3 336
  • 正文 我和宋清朗相戀三年承璃,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片蚌本。...
    茶點故事閱讀 39,981評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡盔粹,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出程癌,到底是詐尸還是另有隱情舷嗡,我是刑警寧澤,帶...
    沈念sama閱讀 35,705評論 5 347
  • 正文 年R本政府宣布嵌莉,位于F島的核電站进萄,受9級特大地震影響,放射性物質發(fā)生泄漏锐峭。R本人自食惡果不足惜中鼠,卻給世界環(huán)境...
    茶點故事閱讀 41,310評論 3 330
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望沿癞。 院中可真熱鬧援雇,春花似錦、人聲如沸椎扬。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,904評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽蚕涤。三九已至筐赔,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間揖铜,已是汗流浹背茴丰。 一陣腳步聲響...
    開封第一講書人閱讀 33,023評論 1 270
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人较沪。 一個月前我還...
    沈念sama閱讀 48,146評論 3 370
  • 正文 我出身青樓鳞绕,卻偏偏與公主長得像失仁,于是被迫代替她去往敵國和親尸曼。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 44,933評論 2 355

推薦閱讀更多精彩內(nèi)容