Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FT-815 Change level to DEBUG for logger_root #1094

Merged
merged 3 commits into from
Dec 5, 2024
Merged

FT-815 Change level to DEBUG for logger_root #1094

merged 3 commits into from
Dec 5, 2024

Conversation

ErnestoLoma
Copy link
Collaborator

@ErnestoLoma ErnestoLoma commented Dec 5, 2024

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

@ErnestoLoma ErnestoLoma requested a review from cmgrote as a code owner December 5, 2024 10:41
@cmgrote cmgrote enabled auto-merge December 5, 2024 12:09
@cmgrote cmgrote merged commit 6d91637 into main Dec 5, 2024
4 checks passed
@ErnestoLoma ErnestoLoma deleted the FT-815 branch December 5, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants