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