why is the logging level set to info for root logger? #263
-
I am wondering why, in the django-mailbox/django_mailbox/management/commands/getmail.py Lines 7 to 10 in 40263b6 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
That's done so logging messages will be emitted to the console; since that's a command-line entrypoint, some amount of user feedback is desirable. The call to |
Beta Was this translation helpful? Give feedback.
-
Looks solved |
Beta Was this translation helpful? Give feedback.
That's done so logging messages will be emitted to the console; since that's a command-line entrypoint, some amount of user feedback is desirable. The call to
basicConfig
is doing more than just setting the logging level for the root logger -- it's also wiring things up so they'll be printed to the console. Usinglogging.info
here will allow allINFO
-level and higher logging messages to make it to the console, regardless of what module they're emitted from.