Daemon now logs to syslog.

master
blallo 2019-01-28 22:25:55 +01:00 committed by blallo
parent 9a99020709
commit fdb0977353
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F
1 changed files with 3 additions and 1 deletions

View File

@ -22,9 +22,11 @@ logging.basicConfig(
format="%(levelname)s: [%(name)s] -> %(message)s",
)
syslog = logging.handlers.SysLogHandler()
syslog = logging.handlers.SysLogHandler(address="/dev/log")
syslog.setFormatter(logging.Formatter("%(levelname)s: [%(name)s] -> %(message)s"))
logger = logging.getLogger(__name__)
logger.setLevel(os.environ.get("BOTZ_LOGLEVEL", logging.INFO))
logger.addHandler(syslog)
logger.debug("Init at debug")