Merge pull request #255 from henryhyn/feat/log_config
feat: 配置日志打印文件及行号
This commit is contained in:
commit
237d5be894
@ -9,7 +9,7 @@ def init_loging_config():
|
|||||||
level = logging.INFO
|
level = logging.INFO
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
level=level,
|
level=level,
|
||||||
format="%(asctime)s %(name)s %(levelname)s %(message)s ",
|
format="%(asctime)s [%(threadName)s] %(name)s %(levelname)s (%(filename)s:%(lineno)d) - %(message)s",
|
||||||
datefmt='%Y-%m-%d %H:%M:%S'
|
datefmt='%Y-%m-%d %H:%M:%S'
|
||||||
)
|
)
|
||||||
_logger = logging.getLogger("MediaCrawler")
|
_logger = logging.getLogger("MediaCrawler")
|
||||||
|
Loading…
Reference in New Issue
Block a user