aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/logging.bbclass
AgeCommit message (Collapse)Author
2015-07-16classes/logging: allow shell message functions to work in devshellPaul Eggleton
Fix a regression caused by the shell message changes - if you run a shell task's runfile, the task isn't actually running in BitBake and thus the message FIFO won't exist - so we should just fall back to printing the message with echo as we did before so that the run files are still useful. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-07-16classes/base: fix die() to print the full logPaul Eggleton
The recent change to connect through the shell logging functions caused a regression - bb.error() and bb.fatal() cause a flag to be set internally such that BitBake's UI will not print the full task log on failure; unfortunately we have in a lot of places called die() or bbfatal() within shell functions with a very terse message as a means of exiting out, where we still want to see the full log (and we were previously). We do still want to have fatal errors with proper messages that don't result in the full log being printed, however we can't ignore the typical usage of die(). Having added a mechanism to BitBake to log an error and reset the flag, create a bbfatal_log() function that uses this and call it from die() to restore the previous behaviour. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-07-12classes/logging: make shell message functions output to the consolePaul Eggleton
Use the FIFO that is now set up when executing tasks within BitBake to make bbdebug/bbnote/bbwarn/bbplain/bberror/bbfatal output to the console through BitBake's UI (as their python counterparts do) instead of only outputting to the task log. Note that this requires the corresponding change in BitBake that creates the FIFO; without it such messages will end up in a file where the FIFO should have been (but won't cause any other ill effects). Remainder of the fix for [YOCTO #5275]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23logging.bbclass: avoid bashism in bbdebug()Patrick Ohly
Checking the bbdebug() debug level parameter with a regular test expression only works in bash. Using tr to filter out digits and then checking whether anything is left achieves the same result and is more portable. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2011-04-28logging: add bb* logging mechanisms for bash recipe functionsDarren Hart
The following logging mechanisms are to be used in bash functions of recipes. They are intended to map one to one in intention and output format with the python recipe logging functions of a similar naming convention: bb.plain(), bb.note(), etc. For the time being, all of these print only to the task logs. Future enhancements may integrate these calls with the bitbake logging infrastructure, allowing for printing to the console as appropriate. The interface and intention statements reflect that future goal. Once it is in place, no changes will be necessary to recipes using these logging mechanisms. I opted to write new functions instead of modifying the oe* logging functions from base.bbclass (and utils.bbclass in oe) for a couple reasons. First, one of my goals was to generate a uniform logging API between bash and python in recipes. Second, there are no users of oe* logging in meta (oe-core) or meta-yocto, while several oe recipes do use them. I wanted to make a clean start with the freedom to change behavior without forcing the oe recipes to change or experience unexpected logging changes. Eventually, the oe recipes can be migrated to the new bb* logging routines and the existing oe* routines can be retired (deleted). Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Chris Larson <clarson@kergoth.com>