Commit 64b6616a authored by 's avatar

Added Jeff Rush patches to medusa syslog formatting

parent 64060ed3
......@@ -155,6 +155,10 @@ import m_syslog
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]
......@@ -166,7 +170,7 @@ class syslog_logger (m_syslog.syslog_client):
def log (self, message):
m_syslog.syslog_client.log (
self,
message,
'%s[%s]: %s' % (self.svc_name, self.pid_str, message),
facility=self.facility,
priority=m_syslog.LOG_INFO
)
......
......@@ -155,6 +155,10 @@ import m_syslog
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]
......@@ -166,7 +170,7 @@ class syslog_logger (m_syslog.syslog_client):
def log (self, message):
m_syslog.syslog_client.log (
self,
message,
'%s[%s]: %s' % (self.svc_name, self.pid_str, message),
facility=self.facility,
priority=m_syslog.LOG_INFO
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment