Flower in my dev/Python
<PYTHON> twisted log 사용
꽃선생
2015. 5. 27. 13:39
1
2
3
4
5
6
7
8
9
10 |
#---Flower Adding---
from twisted.python import log as flower
from twisted.python import logfile
fLog = logfile.LogFile("/log/bin/flower.log", "/log/bin/", rotateLength=0)
flower.startLogging(fLog)
fLog.rotate() #-------------------
flower.msg("[function]====== Sequence Number [000]")
flower.msg(">>value : ", value) |
cs |
rotateLength : 로그파일 크기(byte)
rotateLengh에서 정한 크기가 넘어가면 rotate됨.