diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-02-20 18:34:07 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-02-20 18:34:07 (GMT) |
commit | 7d13cd3f5df5a785059b07579a465a53618165af (patch) | |
tree | 510cbe093cda4ba5f1462c09f2874a0774ceda8a /Doc | |
parent | bb42f5ed7f23a4f16acb57e764634b91283c0ea4 (diff) | |
download | cpython-7d13cd3f5df5a785059b07579a465a53618165af.zip cpython-7d13cd3f5df5a785059b07579a465a53618165af.tar.gz cpython-7d13cd3f5df5a785059b07579a465a53618165af.tar.bz2 |
logging: clarified documentation for Handler.handleError.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/logging.rst | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 0119e0c..ea69b9e 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -339,12 +339,14 @@ subclasses. However, the :meth:`__init__` method in subclasses needs to call .. method:: Handler.handleError(record) This method should be called from handlers when an exception is encountered - during an :meth:`emit` call. By default it does nothing, which means that - exceptions get silently ignored. This is what is mostly wanted for a logging - system - most users will not care about errors in the logging system, they are - more interested in application errors. You could, however, replace this with a - custom handler if you wish. The specified record is the one which was being - processed when the exception occurred. + during an :meth:`emit` call. If the module-level attribute + ``raiseExceptions`` is ``False``, exceptions get silently ignored. This is + what is mostly wanted for a logging system - most users will not care about + errors in the logging system, they are more interested in application + errors. You could, however, replace this with a custom handler if you wish. + The specified record is the one which was being processed when the exception + occurred. (The default value of ``raiseExceptions`` is ``True``, as that is + more useful during development). .. method:: Handler.format(record) |