Commit 16f734b5 authored by Fred Drake's avatar Fred Drake

update the module docstring

parent d8c17dde
...@@ -14,6 +14,12 @@ ...@@ -14,6 +14,12 @@
"""General logging facility """General logging facility
Note:
This module exists only for backward compatibility. Any new code
for Zope 2.8 and newer should use the logging module from Python's
standard library directly. zLOG is only an API shim to map existing
use of zLOG onto the standard logging API.
This module attempts to provide a simple programming API for logging This module attempts to provide a simple programming API for logging
with a pluggable API for defining where log messages should go. with a pluggable API for defining where log messages should go.
...@@ -47,12 +53,9 @@ The module defines several standard severities: ...@@ -47,12 +53,9 @@ The module defines several standard severities:
PANIC=300 -- We're dead! PANIC=300 -- We're dead!
Also, logging facilities will normally ignore negative severities.
To plug in a log handler, simply replace the log_write function To plug in a log handler, simply replace the log_write function
with a callable object that takes 5 arguments: with a callable object that takes 5 arguments:
subsystem -- The subsystem generating the message (e.g. ZODB) subsystem -- The subsystem generating the message (e.g. ZODB)
severity -- The "severity" of the event. This may be an integer or severity -- The "severity" of the event. This may be an integer or
...@@ -69,18 +72,9 @@ with a callable object that takes 5 arguments: ...@@ -69,18 +72,9 @@ with a callable object that takes 5 arguments:
traceback. If provided, then a summary of the error traceback. If provided, then a summary of the error
is added to the detail. is added to the detail.
There is a default event logging facility that: The default logging facility uses Python's logging module as a
back-end; configuration of the logging module must be handled
- swallows logging information by default, somewhere else.
- outputs to sys.stderr if the environment variable
EVENT_LOG_FILE is set to an empty string, and
- outputs to file if the environment variable
EVENT_LOG_FILE is set to a file name.
- Ignores errors that have a severity < 0 by default. This
can be overridden with the environment variable EVENT_LOG_SEVERITY
""" """
from EventLogger import log_write, log_time, severity_string from EventLogger import log_write, log_time, severity_string
......
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