Merge pull request #93 from thekix/master

Include offlineimap and pid in non interactive logs
This commit is contained in:
Rodolfo García Peñas (kix) 2021-10-12 18:02:29 +02:00 committed by GitHub
commit 6204223383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ class Syslog(UIBase):
# create syslog handler # create syslog handler
ch = logging.handlers.SysLogHandler('/dev/log') ch = logging.handlers.SysLogHandler('/dev/log')
# create formatter and add it to the handlers # create formatter and add it to the handlers
self.formatter = logging.Formatter("%(message)s") self.formatter = logging.Formatter("offlineimap[%(process)d]: %(message)s")
ch.setFormatter(self.formatter) ch.setFormatter(self.formatter)
# add the handlers to the logger # add the handlers to the logger
self.logger.addHandler(ch) self.logger.addHandler(ch)

View File

@ -99,7 +99,7 @@ class UIBase:
# create syslog handler # create syslog handler
ch = logging.handlers.SysLogHandler('/dev/log') ch = logging.handlers.SysLogHandler('/dev/log')
# create formatter and add it to the handlers # create formatter and add it to the handlers
self.formatter = logging.Formatter("%(message)s") self.formatter = logging.Formatter("offlineimap[%(process)d]: %(message)s")
ch.setFormatter(self.formatter) ch.setFormatter(self.formatter)
# add the handlers to the logger # add the handlers to the logger
self.logger.addHandler(ch) self.logger.addHandler(ch)