You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_log_level":
class _TxaioLogWrapper(ILogger):
......
def _set_log_level(self, level):
target_level = log_levels.index(level)
# this binds either _log or _no_op above to this instance,
# depending on the desired level.
for (idx, name) in enumerate(log_levels):
if idx <= target_level:
log_method = functools.partial(_log, self, name)
else:
log_method = _no_op
setattr(self, name, log_method)
self._log_level = level
# must set log level in logger
if level == 'trace':
level = 'debug'
self._logger.setLevel( level.upper() )
The text was updated successfully, but these errors were encountered:
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_log_level":
The text was updated successfully, but these errors were encountered: