1.logging模块日志级别 使用logging模块简单示例: >>>import logging >>>logging.debug("this's a test logging") >>>loggin.info("still a test logging") # 默认情况下以上两行没有输出,需要指定日志级别才行 >>>logging.warn("it's waring!!!&quo
formatter = logging.Formatter("%(asctime)s %(levelname)s %(message)s","%Y%b%d-%H:%M:%S") 上面的%Y等是时间格式,所以要想理解上面要表示个什么,先来看一下Python的时间格式. %a - abbreviated weekday name %A - full weekday name %b - abbreviated month name %B - full month name