@@ -728,35 +728,29 @@ calling bitbake, or set it in ``conf/local.conf``::
BB_LOGCONFIG = "hashequiv.json"
-Another example is this ``warn.json`` file to log all ``WARNING`` and
+Another example is this ``warn.yaml`` file to log all ``WARNING`` and
higher priority messages to a ``warn.log`` file::
- {
- "version": 1,
- "formatters": {
- "warnlogFormatter": {
- "()": "bb.msg.BBLogFormatter",
- "format": "%(levelname)s: %(message)s"
- }
- },
+ version: 1
- "handlers": {
- "warnlog": {
- "class": "logging.FileHandler",
- "formatter": "warnlogFormatter",
- "level": "WARNING",
- "filename": "warn.log"
- }
- },
+ '@disable_existing_loggers': false
- "loggers": {
- "BitBake": {
- "handlers": ["warnlog"]
- }
- },
+ formatters:
+ warnlogFormatter:
+ '()': bb.msg.BBLogFormatter
+ format: '%(levelname)s: %(message)s'
- "@disable_existing_loggers": false
- }
+ handlers:
+ warnlog:
+ class: logging.FileHandler
+ formatter: warnlogFormatter
+ level: WARNING
+ filename: warn.log
+
+ loggers:
+ BitBake:
+ handlers:
+ - warnlog
Note that BitBake's helper classes for structured logging are implemented in
``lib/bb/msg.py``.