FT-815 Change level to DEBUG for logger_root #1094
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Generally we want to send log message info and above to the consoleHandler I.e. stdout and message with log level debug and above to fileHandler i.e. /tmp/debug.log. To accomplish this we set the log level of the consoleHander to INFO and the fileHandler DEBUG. Any logger defined in a module like main.py will inherit the level of logger_root as well as the handlers. The level of the logger determines which level of message are sent to a handler. The level of the logger on the handler determines which level of log message appear in the log associated with the handler. We set the level of logger_root to DEBUG so that messages with a level greater than DEBUG will be sent to handlers. Since the consoleHandler's level is set to INFO only log message with a level of info and above will go to the console. If we set the logger_root level to INFO then only log messages with the level of INFO and above would be sent to handlers. Consequently the message with the debug level would not be sent to any handler.s