提交 970fe4e4 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!3 atune:fix the problem of log printing about python code

Merge pull request !3 from hanxinke/test_hxk
......@@ -45,12 +45,13 @@ API.add_resource(train.Training, '/v1/training', '/v1/training')
def config_log(level):
"""app config log"""
logging_format = logging.Formatter('atuned: %(asctime)s [%(levelname)s] %(name)s : %(message)s')
logging_format = logging.Formatter('atuned: %(asctime)s [%(levelname)s] '
'%(name)s[line:%(lineno)d] : %(message)s')
syslog_handler = SysLogHandler(address="/dev/log", facility=SysLogHandler.LOG_LOCAL0)
syslog_handler.setFormatter(logging_format)
syslog_handler.setLevel(level)
root_logger = logging.getLogger()
root_logger.setLevel(level)
root_logger.addHandler(syslog_handler)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册