python日志
什么时候使用logging
logging简单案例
import logging
logging.warning('Watch out!') # will print a message to the console
logging.info('I told you so') # will not print anything日志记录到文件
import logging
logging.basicConfig(filename='example.log',level=logging.DEBUG)
logging.debug('This message should go to the log file')
logging.info('So should this')
logging.warning('And this, too')从多个模块进行日志
日志变量值
日志格式
在日志中显示时间
模块话日志
配置Logging
简单的日志
多线程日志记录
日志文件中的空行
参考
Last updated