This isn't cool:
Please don't call logging.basicConfig(), especially from a library, and especially as an import side-effect...
This requires any application that uses logging.basicConfig() to be modified to include force=True in order for an application's logging system to work. Not a hard fix, just super annoying (and was hard to track down, too, given that importing circus makes applications that rely on logging output look like they aren't running at all, by producing no logging output). It interferes even more with logging in applications that don't intend to call basicConfig().
Really, it's kind of weird that this has been sitting there for 13 years since 02fdb97 (and, ironically, the version prior to that commit was more appropriate).
The logging.basicConfig() calls should be moved back into the mains for circus' tools.
Note that the "no handlers could be found for logger" error that this was intended to solve has not really been applicable since Python 3.2, where a default fallback logging handler was added to logging, thus avoiding this error entirely for unconfigured loggers.
This isn't cool:
circus/circus/__init__.py
Line 11 in ce7bab2
Please don't call
logging.basicConfig(), especially from a library, and especially as an import side-effect...This requires any application that uses
logging.basicConfig()to be modified to includeforce=Truein order for an application's logging system to work. Not a hard fix, just super annoying (and was hard to track down, too, given that importing circus makes applications that rely on logging output look like they aren't running at all, by producing no logging output). It interferes even more with logging in applications that don't intend to callbasicConfig().Really, it's kind of weird that this has been sitting there for 13 years since 02fdb97 (and, ironically, the version prior to that commit was more appropriate).
The
logging.basicConfig()calls should be moved back into themains for circus' tools.Note that the "no handlers could be found for logger" error that this was intended to solve has not really been applicable since Python 3.2, where a default fallback logging handler was added to logging, thus avoiding this error entirely for unconfigured loggers.