Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fee358b

Browse files
committed
logging: clarified documentation for Handler.handleError.
1 parent c3ef037 commit fee358b

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

Doc/library/logging.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,14 @@ subclasses. However, the :meth:`__init__` method in subclasses needs to call
375375
.. method:: Handler.handleError(record)
376376

377377
This method should be called from handlers when an exception is encountered
378-
during an :meth:`emit` call. By default it does nothing, which means that
379-
exceptions get silently ignored. This is what is mostly wanted for a logging
380-
system - most users will not care about errors in the logging system, they are
381-
more interested in application errors. You could, however, replace this with a
382-
custom handler if you wish. The specified record is the one which was being
383-
processed when the exception occurred.
378+
during an :meth:`emit` call. If the module-level attribute
379+
``raiseExceptions`` is ``False``, exceptions get silently ignored. This is
380+
what is mostly wanted for a logging system - most users will not care about
381+
errors in the logging system, they are more interested in application
382+
errors. You could, however, replace this with a custom handler if you wish.
383+
The specified record is the one which was being processed when the exception
384+
occurred. (The default value of ``raiseExceptions`` is ``True``, as that is
385+
more useful during development).
384386

385387

386388
.. method:: Handler.format(record)

0 commit comments

Comments
 (0)