fh = logging.FileHandler('test.log')
fh.setFormatter(formatter)
fh.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setFormatter(formatter)
ch.setLevel(logging.INFO)
logging.getLogger().addHandler(fh)
logging.getLogger().addHandler(ch)
l = logging.getLogger(__name__)
l.setLevel(logging.INFO)
l.info('HI')
Disable output of root logger