1.简单的将日志打印到屏幕 import logging logging.debug('This is debug message')logging.info('This is info message')logging.warning('This is warning message') 屏幕上打印:WARNING:root:This is warning message 默认情况下,logging将日志打印到屏幕,日志级别为WARNING:日志级别大小关系为:CRITICAL > ERR…
1.基本的用法 import logging logging.debug('This is debug message') logging.info('This is info message') logging.warning('This is warning message') 屏幕上打印: WARNING:root:This is warning message 默认情况下,logging将日志打印到屏幕,日志级别为WARNING:日志级别大小关系为:CRITICAL > ERROR >…