Commit b1a3e1d6 authored by Toby Dickenson's avatar Toby Dickenson

merged toby-syslog-access-branch: Collector 271: use different environment...

merged toby-syslog-access-branch: Collector 271: use different environment variables for sending event log and access log to syslog
parent cb47ec84
...@@ -29,6 +29,13 @@ Zope Changes ...@@ -29,6 +29,13 @@ Zope Changes
- Collector #272: Optimisations for RESPONSE.write - Collector #272: Optimisations for RESPONSE.write
- Collector #271: New environment variables are now used
to send the access log into syslog. ZSYSLOG_ACCESS,
ZSYSLOG_ACCESS_FACILITY, and SYSLOG_ACCESS_SERVER now
do the same job as the old environment variables without
_ACCESS in their name. Those old environment variables
still do the same job of sending the event log to syslog.
Bugs: Bugs:
- Collector #32: Use difflib instead of ndiff - Collector #32: Use difflib instead of ndiff
......
...@@ -537,14 +537,13 @@ try: ...@@ -537,14 +537,13 @@ try:
if READ_ONLY: if READ_ONLY:
lg = logger.file_logger('-') # log to stdout lg = logger.file_logger('-') # log to stdout
elif os.environ.has_key('ZSYSLOG'): elif os.environ.has_key('ZSYSLOG_ACCESS'):
lg = logger.syslog_logger(os.environ['ZSYSLOG']) if os.environ.has_key("ZSYSLOG_ACCESS_FACILITY"):
if os.environ.has_key("ZSYSLOG_FACILITY"): lg = logger.syslog_logger(os.environ['ZSYSLOG_ACCESS'],facility=os.environ['ZSYSLOG_ACCESS_FACILITY'])
lg = logger.syslog_logger(os.environ['ZSYSLOG'],facility=os.environ['ZSYSLOG_FACILITY'])
else: else:
lg = logger.syslog_logger(os.environ['ZSYSLOG']) lg = logger.syslog_logger(os.environ['ZSYSLOG_ACCESS'])
elif os.environ.has_key('ZSYSLOG_SERVER'): elif os.environ.has_key('ZSYSLOG_ACCESS_SERVER'):
(addr, port) = os.environ['ZSYSLOG_SERVER'].split( ':') (addr, port) = os.environ['ZSYSLOG_ACCESS_SERVER'].split( ':')
lg = logger.syslog_logger((addr, int(port))) lg = logger.syslog_logger((addr, int(port)))
else: else:
lg = logger.file_logger(LOG_PATH) lg = logger.file_logger(LOG_PATH)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment