What is the point of setLevel in a python logging handler? -
let's have following code: import logging import logging.handlers = logging.getlogger('myapp') h = logging.handlers.rotatingfilehandler('foo.log') h.setlevel(logging.debug) a.addhandler(h) # effective log level still logging.warn print a.geteffectivelevel() a.debug('foo message') a.warn('warning message') i expect setting logging.debug on handler cause debug-level messages written log file. however, prints 30 effective level (equal logging.warning , default), , logs warn message log file, not debug message. it appears handler's log level being dropped on floor, e.g. it's silently ignored. makes me wonder, why have setlevel on handler @ all? it allows finer control. default root logger has warning level set, means wont print messages lower level(no matter how handlers' levels set!). but, if set root logger's level debug , indeed message sent log file: import logging import logging.handlers = logging.getlogg...