Python logging,
* Logging HOWTO
* Logging
`Filter`, `LogRecord` ,
()
class LevelFilter(logging.Filter):
def filter(self, record):
return record.levelname == 'DEBUG'
logger.setLevel(logging.DEBUG)
fh.setLevel(logging.DEBUG)
fh.addFilter(LevelFilter())
logger.addHandler(fh)