Use Twisted's logging facilities.

This commit is contained in:
Greg Taylor 2007-05-24 03:36:58 +00:00
parent f9f24f6616
commit b47d0d2b07
3 changed files with 9 additions and 6 deletions

View file

@ -1,3 +1,5 @@
from twisted.python import log
import session_mgr
import commands_privileged
import commands_general
@ -47,7 +49,7 @@ def log_errmsg(errormsg):
errormsg: (string) The message to be logged.
"""
print 'ERROR: %s' % (errormsg,)
log.error('ERROR: %s' % (errormsg,))
def log_infomsg(infomsg):
"""
@ -55,7 +57,7 @@ def log_infomsg(infomsg):
debugmsg: (string) The message to be logged.
"""
print '%s' % (infomsg,)
log.msg('%s' % (infomsg,))
def time_format(seconds, style=0):
"""
@ -149,4 +151,4 @@ def word_wrap(text, width=78):
) >= width)],
word),
text.split(' ')
)
)