Pywikibot, even if you're just using it as a library, configures its own complicated logging structure:
o "pywiki"
| Level Level 11
| Propagate OFF
| Handler <TerminalHandler <stderr> (INFO)>
| Level INFO
| Filter <pywikibot.userinterfaces.terminal_interface_base.MaxLevelFilter object at 0x7f7f66dafe50>
| Formatter fmt='%(message)s%(newline)s' datefmt=None
| Handler <TerminalHandler <stdout> (STDOUT)>
| Level STDOUT
| Filter <pywikibot.userinterfaces.terminal_interface_base.MaxLevelFilter object at 0x7f7f66daffa0>
| Formatter fmt='%(message)s%(newline)s' datefmt=None
| Handler <TerminalHandler <stderr> (WARNING)>
| Level WARNING
| Formatter fmt='%(levelname)s: %(message)s%(newline)s' datefmt=None
| |
| o<--[pywiki.wiki]
| |
| o<--"pywiki.wiki.family"
| Level NOTSET so inherits level Level 11
|
Is there any way to make it not do this? I want to have full control of the logging config in my application. In particular, I want all the logging to go to my logfile. Having a library install its own handlers which are hard-wired to a TerminalHandler just complicates that.