mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
parent
4e0ffa0bd1
commit
8dbfab5556
@ -363,8 +363,15 @@ class Logger(object):
|
||||
socktype, addr = parse_syslog_address(cfg.syslog_addr)
|
||||
|
||||
# finally setup the syslog handler
|
||||
h = logging.handlers.SysLogHandler(address=addr, facility=facility,
|
||||
socktype=socktype)
|
||||
if sys.version_info >= (2, 7):
|
||||
h = logging.handlers.SysLogHandler(address=addr,
|
||||
facility=facility, socktype=socktype)
|
||||
else:
|
||||
# socktype is only supported in 2.7 and sup
|
||||
# fix issue #541
|
||||
h = logging.handlers.SysLogHandler(address=addr,
|
||||
facility=facility)
|
||||
|
||||
h.setFormatter(fmt)
|
||||
h._gunicorn = True
|
||||
log.addHandler(h)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user