Skip to content

Commit 178808e

Browse files
committed
日志格式优化
1 parent b9d1d0e commit 178808e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

server/utils/log.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import logging
22
import os
33
import syslog
4-
5-
logging.basicConfig(filename='Hawkeye.log', level=logging.INFO)
6-
7-
logger = logging.getLogger()
8-
4+
FORMAT = '%(asctime)s [%(name)s] [%(levelname)s] [%(pathname)s:%(lineno)s %(funcName)s] %(message)s'
5+
logging.basicConfig(filename='Hawkeye.log', level=logging.INFO,format=FORMAT)
6+
logger = logging.getLogger()

0 commit comments

Comments
 (0)