79650245

Date: 2025-06-02 19:50:02
Score: 4
Natty:
Report link

OK, i think I found a reason why the error is not raised. I use a custom logger with a config file and somehow setting the config file for logger disable/delete I don't reallyknow the library own loggers logging.config.fileConfig(Path(cwd, "logging.ini"))

Even with key word disable_existing_loggers set to False

My logging.ini:

[loggers]
keys=root, IBKR

[handlers]
keys=IBKR_handler, consoleHandler

[formatters]
keys=main

[logger_root]
handlers=consoleHandler

[formatter_main]
class=classCustomLogging.CustomFormatter

[handler_consoleHandler]
class=StreamHandler
level=CRITICAL
formatter=main
args=(sys.stdout,)

[logger_IBKR]
level=DEBUG
handlers=IBKR_handler
qualname=IBKR

[handler_IBKR_handler]
level=DEBUG
class=classCustomLogging.CustomTimedRotatingFileHandler
formatter=main
args = ("Debug-IBKR-","D", 7)

Any ideas why disable_existing_loggers doesn't seem to be effective ?

Reasons:
  • Blacklisted phrase (1): Any ideas
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Looks like a comment (1):
  • Low reputation (0.5):
Posted by: beni