Skip to content

Commit d30a381

Browse files
committed
Clarified documentation for logging exception function/method.
1 parent 9823377 commit d30a381

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Doc/library/logging.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,9 @@ is the module's name in the Python package namespace.
227227
.. method:: Logger.exception(msg, *args, **kwargs)
228228

229229
Logs a message with level :const:`ERROR` on this logger. The arguments are
230-
interpreted as for :meth:`debug`. Exception info is added to the logging
231-
message. This method should only be called from an exception handler.
230+
interpreted as for :meth:`debug`, except that any passed *exc_info* is not
231+
inspected. Exception info is always added to the logging message. This method
232+
should only be called from an exception handler.
232233

233234

234235
.. method:: Logger.addFilter(filt)
@@ -845,8 +846,9 @@ functions.
845846
.. function:: exception(msg[, *args[, **kwargs]])
846847

847848
Logs a message with level :const:`ERROR` on the root logger. The arguments are
848-
interpreted as for :func:`debug`. Exception info is added to the logging
849-
message. This function should only be called from an exception handler.
849+
interpreted as for :func:`debug`, except that any passed *exc_info* is not
850+
inspected. Exception info is always added to the logging message. This
851+
function should only be called from an exception handler.
850852

851853

852854
.. function:: log(level, msg[, *args[, **kwargs]])

0 commit comments

Comments
 (0)