From 6fcb9a5152325f4ad9e0e8b1f9d78646d16855b1 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Tue, 6 Jan 2015 11:10:12 +0000 Subject: [PATCH] Clarified documentation for logging exception function/method. --- Doc/library/logging.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 839bdc75797..5e21474812c 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -227,8 +227,9 @@ is the module's name in the Python package namespace. .. method:: Logger.exception(msg, *args, **kwargs) Logs a message with level :const:`ERROR` on this logger. The arguments are - interpreted as for :meth:`debug`. Exception info is added to the logging - message. This method should only be called from an exception handler. + interpreted as for :meth:`debug`, except that any passed *exc_info* is not + inspected. Exception info is always added to the logging message. This method + should only be called from an exception handler. .. method:: Logger.addFilter(filt) @@ -845,8 +846,9 @@ functions. .. function:: exception(msg[, *args[, **kwargs]]) Logs a message with level :const:`ERROR` on the root logger. The arguments are - interpreted as for :func:`debug`. Exception info is added to the logging - message. This function should only be called from an exception handler. + interpreted as for :func:`debug`, except that any passed *exc_info* is not + inspected. Exception info is always added to the logging message. This + function should only be called from an exception handler. .. function:: log(level, msg[, *args[, **kwargs]])