RotatingFileHandler throws an exception when delay parameter is set
问题 When I run the following code under Python 2.6 import logging from logging.handlers import RotatingFileHandler rfh = RotatingFileHandler("testing.log", delay=True) logging.getLogger().addHandler(rfh) logging.warning("Boo!") then the last line throws AttributeError: RotatingFileHandler instance has no attribute 'level' . So I add the line rfh.setLevel(logging.DEBUG) before the call to addHandler , and then the last line throws AttributeError: RotatingFileHandler instance has no attribute