Project

General

Profile

1
import logging
2

    
3
dlilogger = logging.getLogger('dli')
4
hdlr = logging.FileHandler('dli.log')
5
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
6
hdlr.setFormatter(formatter)
7
dlilogger.addHandler(hdlr)
8
dlilogger.setLevel(logging.WARNING)
(6-6/9)