Skip to content

Commit

Permalink
Improve documentation of Zope's Error Logging Services
Browse files Browse the repository at this point in the history
SiteErrorLog can be configured to ignore certain exceptions.

Now, this is also documented.

cf #671
cf zopefoundation/Products.PluggableAuthService#53

modified:   CHANGES.rst
modified:   docs/zopebook/ZopeServices.rst
  • Loading branch information
jugmac00 committed Sep 9, 2019
1 parent e60ec71 commit c3bca58
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ https://github.com/zopefoundation/Zope/blob/4.x/CHANGES.rst
5.0a1 (unreleased)
-----------------

- Improve documentation for Zope's error logging services.

Backwards incompatible changes
++++++++++++++++++++++++++++++

Expand Down
39 changes: 23 additions & 16 deletions docs/zopebook/ZopeServices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -340,25 +340,32 @@ Now you can use the new MailHost object from a Script.
Error Logging Services
----------------------

The *Site Error Log* object, typically accessible in the Zope root
under the name 'error_log', provides debugging and error logging
information in real-time. When your site encounters an error, it
will be logged in the Site Error Log, allowing you to review (and
hopefully fix!) the error.
.. note::

Options settable on a Site Error Log instance
include:
As of Zope 4, the **Site Error Log** is no longer a a dependency of Zope,
but has to be installed additionally if you want to use it.

Number of exceptions to keep
keep 20 exceptions by default, rotating "old" exceptions out when more
than 20 are stored. Set this to a higher or lower number as you like.
The **Site Error Log** object, typically accessible in the Zope root
under the name `error_log`, provides debugging and error logging
information in real-time. When your site encounters an error, it
will be logged in the **Site Error Log***, allowing you to review (and
hopefully fix!) the error.

Copy exceptions to the event log
If this option is selected, the site error log object will copy the text
of exceptions that it receives to the "event log" facility, which is
typically controlled by the 'EVENT_LOG_FILE' environment variable. For
more information about this environment variable, see the chapter
entitled `Installing and Starting Zope <InstallingZope.html>`_.
Available options for the **Site Error Log** instance:

- *Number of exceptions to keep* - This option is set to 20 by default,
rotating old exceptions out when more than 20 are stored.
You may set this to a higher or lower number as you like.

- *Copy exceptions to the event log* - If this option is enabled, the
**Site Error Log** object will copy the text of the received
exceptions to Zope's event log.

- *Ignored exception types* - Here you can add **Exceptions** which you
want to ignore.
This means they will be neither shown in the ZMI, nor logged to
Zope's event log.
By default `Unauthorized`, `NotFound` and `Redirect` are set.

Virtual Hosting Services
------------------------
Expand Down

0 comments on commit c3bca58

Please sign in to comment.