2018. 9. 5.

Write custom log in python

Write custom log in python
base_record = dict(
    name=‘module.sub’, levelname=‘error’, levelno=logging.ERROR, 
level=logging.ERROR,
funcName=‘callername’, lineno=0, args=(), exe_info=None)

record = logging.makeLogRecord(dict(base_record, msg=“some messages”))
logger.handle(record) # write log



September 05, 2018 at 11:10AM

댓글 없음:

댓글 쓰기