用python.twisted.logfile每天记录日志,并用不记录stdout中的内容
2014-06-17 08:19 二进制乐谱 阅读(409) 评论(0) 编辑 收藏 举报#导入的头
from twisted.python import log
from twisted.python.logfile import *
#开始记录,输入日志名和存放的路径,setStdout为0不记录stdout的内容,默认setStdout=1,记录print的输出
log.startLogging(DailyLogFile("xxx.txt","d:/"),setStdout=0)
#记录信息log.msg("aaaaaaaaa")
做个标记