Closed 0verbyte closed 6 years ago
@netromdk updated and rebased. Config still logs messages, because the handler is registered within the class and not exposed. What do you think about just passing an argument to the config class to disable the stream handler in this case?
Config still logs messages, because the handler is registered within the class and not exposed.
I'm not sure what you mean by the comment. If you call the static function that runs through all instances then you'll catch all of them.
I mean that within our config class, we setup a logger and log a message before the removeHandler can deregister that handler from logging the message. Example:
Notice that even with -q slacker will log to stdout.
% ./slacker.py -q
2018-02-03 15:02:30,105 - Config - INFO - Loaded config from: /Users/bdavis/.slacker
0xCoders>
Implements #38
This adds support for stdout logging via the Logger class. Slacker also accepts
-q|--quiet
to suppress stdout logging.