首页 > 编程语言 > 详细

python logging

时间:2020-09-07 15:48:04      阅读:47      评论:0      收藏:0      [点我收藏+]
import logging
logging.basicConfig(format="%(asctime)s:%(name)s:%(levelname)s:%(message)s",filename=web_server.log,level=logging.DEBUG)
#logging.basicConfig(format=%(asctime)s %(message)s,filename=web_server.log,level=logging.DEBUG)
logging.warning(is when this event was logged.)
#logging.basicConfig(filename=web_server.log , format=%(levelname)s %s(acstime)s %(message)s,level=logging.DEBUG)

logging.warning(warning log)
logging.debug(debug log)
logging.info(info log)
logging.error(error log)
logging.critical(critical log)

 

python logging

原文:https://www.cnblogs.com/zy09/p/13626607.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!