[Zope-Checkins] CVS: Zope2 - syslogLogger.py:1.7
Brian Lloyd
brian@digicool.com
Fri, 16 Mar 2001 12:10:48 -0500 (EST)
Update of /cvs-repository/Zope2/lib/python/ZLogger
In directory korak:/home/brian/temp/mainline_test/lib/python/ZLogger
Modified Files:
syslogLogger.py
Log Message:
merged
--- Updated File syslogLogger.py in package Zope2 --
--- syslogLogger.py 2001/03/08 19:18:28 1.6
+++ syslogLogger.py 2001/03/16 17:10:48 1.7
@@ -85,7 +85,7 @@
from syslog import syslog_client, LOG_ALERT, LOG_ERR, LOG_WARNING, LOG_NOTICE
from syslog import LOG_INFO, LOG_DEBUG
-import os, string
+import os, string, traceback
pid_str='[%s]: ' % os.getpid()
@@ -122,6 +122,10 @@
sev=LOG_INFO
else:
sev=LOG_DEBUG
-
+ if err:
+ try: sum = sum + ' : ' + traceback.format_exception_only(
+ err[0], err[1]
+ )[0]
+ except: pass
if self.on:
self.client.log(sub + pid_str + sum, priority=sev)