diff options
Diffstat (limited to 'bitbake/lib/bb/ui/knotty.py')
| -rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 68 |
1 files changed, 60 insertions, 8 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 695108a646..24b7a77085 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py | |||
| @@ -419,6 +419,18 @@ def main(server, eventHandler, params, tf = TerminalFilter): | |||
| 419 | "stream": "ext://sys.stderr", | 419 | "stream": "ext://sys.stderr", |
| 420 | "filters": ["BitBake.stderrFilter"], | 420 | "filters": ["BitBake.stderrFilter"], |
| 421 | }, | 421 | }, |
| 422 | # This handler can be used if specific loggers should print on | ||
| 423 | # the console at a lower severity than the default. It will | ||
| 424 | # display any messages sent to it that are lower than then | ||
| 425 | # BitBake.console logging level (so as to prevent duplication of | ||
| 426 | # messages). Nothing is attached to this handler by default | ||
| 427 | "BitBake.verbconsole": { | ||
| 428 | "class": "logging.StreamHandler", | ||
| 429 | "formatter": "BitBake.consoleFormatter", | ||
| 430 | "level": 1, | ||
| 431 | "stream": "ext://sys.stdout", | ||
| 432 | "filters": ["BitBake.verbconsoleFilter"], | ||
| 433 | }, | ||
| 422 | }, | 434 | }, |
| 423 | "formatters": { | 435 | "formatters": { |
| 424 | # This format instance will get color output enabled by the | 436 | # This format instance will get color output enabled by the |
| @@ -442,7 +454,11 @@ def main(server, eventHandler, params, tf = TerminalFilter): | |||
| 442 | "BitBake.stderrFilter": { | 454 | "BitBake.stderrFilter": { |
| 443 | "()": "bb.msg.LogFilterGEQLevel", | 455 | "()": "bb.msg.LogFilterGEQLevel", |
| 444 | "level": "ERROR" | 456 | "level": "ERROR" |
| 445 | } | 457 | }, |
| 458 | "BitBake.verbconsoleFilter": { | ||
| 459 | "()": "bb.msg.LogFilterLTLevel", | ||
| 460 | "level": console_loglevel | ||
| 461 | }, | ||
| 446 | }, | 462 | }, |
| 447 | "loggers": { | 463 | "loggers": { |
| 448 | "BitBake": { | 464 | "BitBake": { |
| @@ -455,13 +471,49 @@ def main(server, eventHandler, params, tf = TerminalFilter): | |||
| 455 | 471 | ||
| 456 | # Enable the console log file if enabled | 472 | # Enable the console log file if enabled |
| 457 | if consolelogfile and not params.options.show_environment and not params.options.show_versions: | 473 | if consolelogfile and not params.options.show_environment and not params.options.show_versions: |
| 458 | logconfig["handlers"]["BitBake.consolelog"] ={ | 474 | logconfig = bb.msg.mergeLoggingConfig(logconfig, { |
| 459 | "class": "logging.FileHandler", | 475 | "version": 1, |
| 460 | "formatter": "BitBake.logfileFormatter", | 476 | "handlers" : { |
| 461 | "level": "INFO", | 477 | "BitBake.consolelog": { |
| 462 | "filename": consolelogfile, | 478 | "class": "logging.FileHandler", |
| 463 | } | 479 | "formatter": "BitBake.logfileFormatter", |
| 464 | logconfig["loggers"]["BitBake"]["handlers"].append("BitBake.consolelog") | 480 | "level": loglevel, |
| 481 | "filename": consolelogfile, | ||
| 482 | }, | ||
| 483 | # Just like verbconsole, anything sent here will go to the | ||
| 484 | # log file, unless it would go to BitBake.consolelog | ||
| 485 | "BitBake.verbconsolelog" : { | ||
| 486 | "class": "logging.FileHandler", | ||
| 487 | "formatter": "BitBake.logfileFormatter", | ||
| 488 | "level": 1, | ||
| 489 | "filename": consolelogfile, | ||
| 490 | "filters": ["BitBake.verbconsolelogFilter"], | ||
| 491 | }, | ||
| 492 | }, | ||
| 493 | "filters": { | ||
| 494 | "BitBake.verbconsolelogFilter": { | ||
| 495 | "()": "bb.msg.LogFilterLTLevel", | ||
| 496 | "level": loglevel, | ||
| 497 | }, | ||
| 498 | }, | ||
| 499 | "loggers": { | ||
| 500 | "BitBake": { | ||
| 501 | "handlers": ["BitBake.consolelog"], | ||
| 502 | }, | ||
| 503 | |||
| 504 | # Other interesting things that we want to keep an eye on | ||
| 505 | # in the log files in case someone has an issue, but not | ||
| 506 | # necessarily show to the user on the console | ||
| 507 | "BitBake.SigGen.HashEquiv": { | ||
| 508 | "level": "VERBOSE", | ||
| 509 | "handlers": ["BitBake.verbconsolelog"], | ||
| 510 | }, | ||
| 511 | "BitBake.RunQueue.HashEquiv": { | ||
| 512 | "level": "VERBOSE", | ||
| 513 | "handlers": ["BitBake.verbconsolelog"], | ||
| 514 | } | ||
| 515 | } | ||
| 516 | }) | ||
| 465 | 517 | ||
| 466 | bb.utils.mkdirhier(os.path.dirname(consolelogfile)) | 518 | bb.utils.mkdirhier(os.path.dirname(consolelogfile)) |
| 467 | loglink = os.path.join(os.path.dirname(consolelogfile), 'console-latest.log') | 519 | loglink = os.path.join(os.path.dirname(consolelogfile), 'console-latest.log') |
