forked from ubuntu/ubuntu-make
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a stdout handler for subprocess while testing
* As we can't sneak in the process to add the handler to fetch warnings and errors, use another LOG_CFG for testing which set the default level on stdout as warning. * Remove the on test_basics_cli the first INFO message, which corresponds to inform which level setting was set.
- Loading branch information
Showing
3 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
version: 1 | ||
disable_existing_loggers: False | ||
formatters: | ||
simple: | ||
format: "[%(name)s] %(levelname)s: %(message)s" | ||
with_time: | ||
format: "%(asctime)s [%(name)s] %(levelname)s: %(message)s" | ||
handlers: | ||
console: | ||
class: logging.StreamHandler | ||
level: WARNING | ||
formatter: simple | ||
stream: ext://sys.stdout | ||
debug_file_handler: | ||
class: logging.handlers.RotatingFileHandler | ||
level: DEBUG | ||
formatter: with_time | ||
filename: debug.log | ||
maxBytes: 10485760 # 10MB | ||
backupCount: 20 | ||
encoding: utf8 | ||
info_file_handler: | ||
class: logging.handlers.RotatingFileHandler | ||
level: INFO | ||
formatter: with_time | ||
filename: info.log | ||
maxBytes: 10485760 # 10MB | ||
backupCount: 20 | ||
encoding: utf8 | ||
warn_error_file_handler: | ||
class: logging.handlers.RotatingFileHandler | ||
level: WARNING | ||
formatter: with_time | ||
filename: errors.log | ||
maxBytes: 10485760 # 10MB | ||
backupCount: 20 | ||
encoding: utf8 | ||
root: | ||
level: DEBUG | ||
handlers: [console, debug_file_handler, info_file_handler, warn_error_file_handler] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters