Commit 2ed0e132 authored by Andreas Jung's avatar Andreas Jung

backport of medusa patches

parent 2894f194
......@@ -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]
......@@ -165,11 +169,11 @@ class syslog_logger (m_syslog.syslog_client):
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
......
......@@ -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]
......@@ -165,11 +169,11 @@ class syslog_logger (m_syslog.syslog_client):
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
......
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