Cast syslogport value from getenv as int (#22664)
SysLogHandler requires an int for port, but getenv produces a string.
Cast return from getenv as int to overcome this mismatch.
(cherry picked from commit 5334814396
)
This commit is contained in:
parent
dc8ad50eaa
commit
8857a80109
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ class CallbackModule(CallbackBase):
|
||||||
|
|
||||||
self.handler = logging.handlers.SysLogHandler(
|
self.handler = logging.handlers.SysLogHandler(
|
||||||
address = (os.getenv('SYSLOG_SERVER','localhost'),
|
address = (os.getenv('SYSLOG_SERVER','localhost'),
|
||||||
os.getenv('SYSLOG_PORT',514)),
|
int(os.getenv('SYSLOG_PORT',514))),
|
||||||
facility= os.getenv('SYSLOG_FACILITY',logging.handlers.SysLogHandler.LOG_USER)
|
facility= os.getenv('SYSLOG_FACILITY',logging.handlers.SysLogHandler.LOG_USER)
|
||||||
)
|
)
|
||||||
self.logger.addHandler(self.handler)
|
self.logger.addHandler(self.handler)
|
||||||
|
|
Loading…
Reference in a new issue