本文实例讲述了python根据文件大小打log日志的方法,分享给大家供大家参考。具体方法如下: import glob import logging import logging.handlers LOG_FILENAME='logging_rotatingfile_example.out' # Set up a specific logger with our desired output level my_logger = logging.getLogger('MyLogger') my_logger.setLevel(logging.DEBUG) # Add the log messa