diff --git a/mylib/config.py b/mylib/config.py index 26f7fb2..172f6f5 100644 --- a/mylib/config.py +++ b/mylib/config.py @@ -573,6 +573,13 @@ class Config: help='Show verbose messages' ) + self.options_parser.add_argument( + '-C', + '--console', + action='store_true', + help='Log on console' + ) + self.add_options_to_parser(self.options_parser) return self.options_parser @@ -623,6 +630,10 @@ class Config: elif options.verbose: logging.getLogger().setLevel(logging.INFO) + if options.console: + console_handler = logging.StreamHandler(sys.stdout) + logging.getLogger().addHandler(console_handler) + self._loaded() return options