From da0c4c89e48c3647175965aa236fcc9515ea105d Mon Sep 17 00:00:00 2001 From: Chris Coutinho Date: Sat, 12 Oct 2019 11:32:55 +0200 Subject: [PATCH] Additional address for sysloghandler to handle mac --- offlineimap/ui/UIBase.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/offlineimap/ui/UIBase.py b/offlineimap/ui/UIBase.py index 731d6f1..a8330e2 100644 --- a/offlineimap/ui/UIBase.py +++ b/offlineimap/ui/UIBase.py @@ -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)