Added a level 4 debug log to dump the MSN protocol.
Fixed debugging to not print duplicates after SIGHUP
Updated config-example.xml
git-svn-id: http://delx.cjb.net/svn/pymsnt/trunk@191
55fbd22a-6204-0410-b2f0-
b6c764c7e90a
committer: jamesbunton <jamesbunton@
55fbd22a-6204-0410-b2f0-
b6c764c7e90a>
<pid>PyMSNt.pid</pid>
<!-- If set, the transport will background itself when run -->
<background/>
-<!-- The Twisted reactor to choose. Pick poll or epoll on Linux, kqueue on BSD. Or leave as default (select) -->
+<!-- The Twisted reactor to choose. Pick poll or epoll on Linux, kqueue on BSD. Or leave as default (best found) -->
<!-- <reactor>poll</reactor> -->
0 -> No logging
1 -> Log tracebacks
2 -> Log tracebacks, warnings and errors
-3 -> Log everything -->
+3 -> Log all sorts of informational (mostly useless stuff)
+4 -> Log the MSN protocol code sent
+-->
<!-- <debugLevel>0</debugLevel> -->
<!-- The file to log to. Leave this disabled for stdout -->
sys.__stdout__.write(text + "\n")
sys.__stdout__.flush()
+
debugFile = None
def reloadConfig():
global debugFile
else:
debugFile = sys.__stdout__
+ try:
+ log.removeObserver(observer)
+ except ValueError:
+ pass
log.startLoggingWithObserver(observer)
else:
log.discardLogs()
def reloadConfig():
msn.MSNConnection.GETALLAVATARS = config.getAllAvatars
+ msn.DEBUGALL = config._debugLevel >= 4
def isGroupJID(jid):
""" Returns True if the JID passed is a valid groupchat JID (for MSN, does not contain '%') """
from msn import FORWARD_LIST, ALLOW_LIST, BLOCK_LIST, REVERSE_LIST, PENDING_LIST
from msn import STATUS_ONLINE, STATUS_OFFLINE, STATUS_HIDDEN, STATUS_IDLE, STATUS_AWAY, STATUS_BUSY, STATUS_BRB, STATUS_PHONE, STATUS_LUNCH
from msn import MSNContact, MSNContactList
+from msn import DEBUGALL
PINGSPEED = 50.0
-DEBUGALL = True
+DEBUGALL = False
LINEDEBUG = False
MESSAGEDEBUG = False
MSNP2PDEBUG = False