3 ms·
No, please don't call "logging.whatever" as needed. That uses the root logger, and that removes the consumer's ability to tune different loggers. logger = log
by jdunck 15y ago
No, please don't call "logging.whatever" as needed. That uses the root logger, and that removes the consumer's ability to tune different loggers.
logger = logging.getLogger("libname.foo")
logger.<whatever> is much more useful and polite.
Using the top-level logger is like putting this in your library:
__builtins__.__dict__.update(globals())
Bad form.