Hello.
Please, help to translate this peace of code to logbook:
@contextmanager
def change_level(level):
log = logging.getLogger("foo")
save_level, log.level = log.level, level
try:
yield
finally:
log.level = save_level
As @donri suggested on IRC, it should be around the lines
def change_level(level):
return NullHandler(level=level, bubble=False).threadbound()
Which looks wonderful and great, except it filters all modules. If i pass
any filter function there, it is not called. I only need to silence a
specific channel and only messages of level X or less importance.
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/pocoo-libs/-/NZKDE2aLnrQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pocoo-libs?hl=en.