标签:use level 日志输出 config asc process proc app date
# !/user/bin/python # -*- coding: utf-8 -*- ‘‘‘ subprocess : 需要在linux平台上测试 shell logging ‘‘‘ import logging # 将日志输出在文件里 # logging.basicConfig(filename="app.log", level=logging.DEBUG) logging.basicConfig(filename="app.log", level=logging.WARNING, format=‘%(asctime)s %(levelname)s %(filename)s:%(lineno)d - %(message)s‘, datefmt=‘%m/%d/%Y %I:%M:%S %p‘) # 在日志上加上时间. %p代表pm. TODO 为什么没打出行数?
标签:use level 日志输出 config asc process proc app date
原文地址:https://www.cnblogs.com/cheese320/p/9061279.html