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)
|
socktype, addr = parse_syslog_address(cfg.syslog_addr)
|
||||||
|
|
||||||
# finally setup the syslog handler
|
# finally setup the syslog handler
|
||||||
h = logging.handlers.SysLogHandler(address=addr, facility=facility,
|
if sys.version_info >= (2, 7):
|
||||||
socktype=socktype)
|
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.setFormatter(fmt)
|
||||||
h._gunicorn = True
|
h._gunicorn = True
|
||||||
log.addHandler(h)
|
log.addHandler(h)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user