Additional address for sysloghandler to handle mac
This commit is contained in:
parent
ba4ecea9e4
commit
da0c4c89e4
|
@ -96,8 +96,13 @@ class UIBase(object):
|
|||
def setup_sysloghandler(self):
|
||||
"""Backend specific syslog handler."""
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
address = '/var/run/syslog'
|
||||
else:
|
||||
address = '/dev/log'
|
||||
|
||||
# create syslog handler
|
||||
ch = logging.handlers.SysLogHandler('/dev/log')
|
||||
ch = logging.handlers.SysLogHandler(address)
|
||||
# create formatter and add it to the handlers
|
||||
self.formatter = logging.Formatter("%(message)s")
|
||||
ch.setFormatter(self.formatter)
|
||||
|
|
Loading…
Reference in New Issue