>>> import logging >>> logging.basicConfig(level=logging.DEBUG) >>> l = logging.getLogger('foo') >>> l.handlers [] >>> l.addHandler(logging.FileHandler('/tmp/f')) >>> l.handlers [] >>> l.handlers[0].setLevel(logging.DEBUG) >>> l.debug('x') DEBUG:foo:x