[Zope-Checkins] CVS: Zope/lib/python/ZLogger - stupidFileLogger.py:1.9 syslogLogger.py:1.9
Andreas Jung
andreas@digicool.com
Thu, 7 Feb 2002 13:02:09 -0500
Update of /cvs-repository/Zope/lib/python/ZLogger
In directory cvs.zope.org:/tmp/cvs-serv24333
Modified Files:
stupidFileLogger.py syslogLogger.py
Log Message:
replaced string module calls by string methods
=== Zope/lib/python/ZLogger/stupidFileLogger.py 1.8 => 1.9 ===
#
##############################################################################
-import time, sys, string, os, thread
+import time, sys, os, thread
from zLOG import severity_string, log_time, format_exception
@@ -49,7 +49,7 @@
global _stupid_severity
if _stupid_severity is None:
- try: _stupid_severity=string.atoi(os.environ['STUPID_LOG_SEVERITY'])
+ try: _stupid_severity=int(os.environ['STUPID_LOG_SEVERITY'])
except: _stupid_severity=0
if severity < _stupid_severity: return
=== Zope/lib/python/ZLogger/syslogLogger.py 1.8 => 1.9 ===
from syslog import LOG_INFO, LOG_DEBUG
-import os, string, traceback
+import os, traceback
pid_str='[%s]: ' % os.getpid()
@@ -23,7 +23,7 @@
def __init__(self):
if os.environ.has_key('ZSYSLOG_SERVER'):
- (addr, port) = string.split(os.environ['ZSYSLOG_SERVER'], ':')
+ (addr, port) = os.environ['ZSYSLOG_SERVER'].split(':')
self.client = syslog_client((addr, int(port)))
self.on = 1
elif os.environ.has_key('ZSYSLOG'):