Open blinkingmatt opened 6 years ago
I just spent the last couple hours tracking this down, and of course didn't find this bug until I was done. Still same issue in txaio 20.4.1. I made a gist to repro: https://gist.github.com/sethrh/331cadc538051cb0c0eb1de001a3b70f
I found this because I wanted to set my logger's level to debug, while setting all of the autobahn.websocket* loggers to warn.
Additionally, individual loggers should have an interface to set their log levels.
System:
The txaio logging framework delegates the info, warning and the like calls to a "logging.Logger" instance. But calling "_TxaioLogWrapper._set_log_level" does not set log level in underlying "logging.Logger" instance. The corresponding methods of "logging.Logger" check for the effective log level. Without setting the log level in "_set_log_level" the log level of the root logger (parent) is always used.
I suggest a small addition in _"_TxaioLogWrapper._set_loglevel":