[Zope-Checkins] CVS: Zope2 - logger.py:1.12
andreas@serenade.digicool.com
andreas@serenade.digicool.com
Tue, 1 May 2001 08:06:21 -0400
Update of /cvs-repository/Zope2/ZServer/medusa
In directory serenade.digicool.com:/tmp/cvs-serv12506
Modified Files:
logger.py
Log Message:
backport of medusa patches
--- Updated File logger.py in package Zope2 --
--- logger.py 2001/05/01 11:44:48 1.11
+++ logger.py 2001/05/01 12:06:20 1.12
@@ -155,6 +155,10 @@
syslog_logger = m_syslog.syslog_client
class syslog_logger (m_syslog.syslog_client):
+
+ svc_name = 'medusa'
+ pid_str = str(os.getpid())
+
def __init__ (self, address, facility='user'):
m_syslog.syslog_client.__init__ (self, address)
self.facility = m_syslog.facility_names[facility]
@@ -165,11 +169,11 @@
def log (self, message):
m_syslog.syslog_client.log (
- self,
- message,
- facility=self.facility,
- priority=m_syslog.LOG_INFO
- )
+ self,
+ '%s[%s]: %s' % (self.svc_name, self.pid_str, message),
+ facility=self.facility,
+ priority=m_syslog.LOG_INFO
+ )
# log to a stream socket, asynchronously