diff options
author | emkael <emkael@tlen.pl> | 2018-02-23 19:37:53 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-02-23 19:37:53 +0100 |
commit | b30e786b2f647151fbc358d185d13e45cbc75b84 (patch) | |
tree | 3d9191994d2ba3e463de2d345915fe3c47fdb624 /playoff.py | |
parent | 65ecd399ea82abdafd0a2471193a9c850b50db87 (diff) |
Logging facility configured by command line arguments
Diffstat (limited to 'playoff.py')
-rw-r--r-- | playoff.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -3,6 +3,7 @@ import traceback from jfr_playoff.filemanager import PlayoffFileManager from jfr_playoff.generator import PlayoffGenerator from jfr_playoff.settings import PlayoffSettings +from jfr_playoff.logger import PlayoffLogger def main(): @@ -25,6 +26,12 @@ def main(): type=str, nargs='?', default=None) arguments = arg_parser.parse_args() + PlayoffLogger.setup('ERROR' if arguments.quiet else ( + 'INFO' if arguments.verbose else ( + 'DEBUG' if arguments.debug else 'WARNING'))) + + PlayoffLogger.get().debug('started with arguments: %s', arguments) + settings = PlayoffSettings(arguments.config_file) interactive = settings.interactive |