python3 log 日志记录时间:2023-03-09 07:41:36 在调试的过程中,很多地方需要用到日志 如下 import logging LOG_FORMAT = "%(asctime)s - %(levelname)s - %(message)s" logging.basicConfig(filename='my.log', level=logging.DEBUG, format=LOG_FORMAT) logging.debug("log") 日志还是很多种级别,这里就记录debug级别