-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
I would like to suggest to not use the root logger for logging. Instead consider using something like:
import logging
logger = logging.getLogger(__name__)
...
logger.info(f"Found gold in the factory basement: {worth=}$")
It would make redirecting more convenient.
Also, to quote the elders of python:
Note: It is strongly advised that you do not log to the root logger in your library. Instead, use a logger with a unique and easily identifiable name, such as the name for your library’s top-level package or module. Logging to the root logger will make it difficult or impossible for the application developer to configure the logging verbosity or handlers of your library as they wish.
Let me know what you think.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels