mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-04 04:50:05 +08:00
10 lines
315 B
Python
10 lines
315 B
Python
|
def set_debug(logger, path):
|
||
|
from logging import FileHandler, Formatter, DEBUG
|
||
|
hdlr = FileHandler(path)
|
||
|
logger.addHandler(hdlr)
|
||
|
datefmt = '%Y/%m/%d %H:%M:%S'
|
||
|
fmt = Formatter(
|
||
|
"%(levelname)s %(asctime)s %(message)s", datefmt=datefmt)
|
||
|
hdlr.setFormatter(fmt)
|
||
|
logger.setLevel(DEBUG)
|