-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change: Adjust default logging configuration
Allow logging to stdout and file at the same time. With this commit the default logging configuration is: ``` [handlers] keys=console,file,syslog [formatters] keys=file,syslog [formatter_file] format=OSPD[$PID] %(asctime)s: %(levelname)s: (%(name)s) %(message)s [formatter_syslog] format=OSPD[$PID] %(levelname)s: (%(name)s) %(message)s [handler_console] class=logging.StreamHandler level=INFO formatter=file args=sys.stdout [handler_syslog] class=handlers.SysLogHandler level=INFO formatter=syslog args=("/dev/log", handlers.SysLogHandler.LOG_USER) [handler_file] class=handlers.WatchedFileHandler level=INFO formatter=file args=("/dev/null", "a") [loggers] keys=root [logger_root] level=NOTSET handlers=file propagate=0 ``` Depending on the `--foreground` and `--log-file` arguments only the logger_root handlers value is adjusted. Additionally If `--log-file` is set the handler_file args is updated to point to the value of the argument.
- Loading branch information
1 parent
440f10a
commit 52ef7a0
Showing
1 changed file
with
31 additions
and
23 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