handler.setLevel(getattr(logging, level, 'INFO'))
print(handler.level)
mylogger.debug('test')
update_handler_level(mylogger, logging.StreamHandler)
Python logging to multiple handlers, at different log levels?