@@ -521,7 +521,7 @@ custom handlers) are the following configuration methods:
521521
522522* The :meth: `~Handler.setLevel ` method, just as in logger objects, specifies the
523523 lowest severity that will be dispatched to the appropriate destination. Why
524- are there two :func: ` setLevel ` methods? The level set in the logger
524+ are there two :meth: ` ~Handler. setLevel ` methods? The level set in the logger
525525 determines which severity of messages it will pass to its handlers. The level
526526 set in each handler determines which messages that handler will send on.
527527
@@ -775,29 +775,29 @@ What happens if no configuration is provided
775775
776776If no logging configuration is provided, it is possible to have a situation
777777where a logging event needs to be output, but no handlers can be found to
778- output the event. The behaviour of the logging package in these
779- circumstances is dependent on the Python version.
778+ output the event.
780779
781- For versions of Python prior to 3.2, the behaviour is as follows:
780+ The event is output using a 'handler of last resort', stored in
781+ :data: `lastResort `. This internal handler is not associated with any
782+ logger, and acts like a :class: `~logging.StreamHandler ` which writes the
783+ event description message to the current value of ``sys.stderr `` (therefore
784+ respecting any redirections which may be in effect). No formatting is
785+ done on the message - just the bare event description message is printed.
786+ The handler's level is set to ``WARNING ``, so all events at this and
787+ greater severities will be output.
782788
783- * If *logging.raiseExceptions * is ``False `` (production mode), the event is
784- silently dropped.
789+ .. versionchanged :: 3.2
785790
786- * If *logging.raiseExceptions * is ``True `` (development mode), a message
787- 'No handlers could be found for logger X.Y.Z' is printed once.
791+ For versions of Python prior to 3.2, the behaviour is as follows:
788792
789- In Python 3.2 and later, the behaviour is as follows:
793+ * If :data: `raiseExceptions ` is ``False `` (production mode), the event is
794+ silently dropped.
790795
791- * The event is output using a 'handler of last resort', stored in
792- ``logging.lastResort ``. This internal handler is not associated with any
793- logger, and acts like a :class: `~logging.StreamHandler ` which writes the
794- event description message to the current value of ``sys.stderr `` (therefore
795- respecting any redirections which may be in effect). No formatting is
796- done on the message - just the bare event description message is printed.
797- The handler's level is set to ``WARNING ``, so all events at this and
798- greater severities will be output.
796+ * If :data: `raiseExceptions ` is ``True `` (development mode), a message
797+ 'No handlers could be found for logger X.Y.Z' is printed once.
799798
800- To obtain the pre-3.2 behaviour, ``logging.lastResort `` can be set to ``None ``.
799+ To obtain the pre-3.2 behaviour,
800+ :data: `lastResort ` can be set to ``None ``.
801801
802802.. _library-config :
803803
@@ -999,7 +999,7 @@ Logged messages are formatted for presentation through instances of the
999999use with the % operator and a dictionary.
10001000
10011001For formatting multiple messages in a batch, instances of
1002- :class: `~handlers. BufferingFormatter ` can be used. In addition to the format
1002+ :class: `BufferingFormatter ` can be used. In addition to the format
10031003string (which is applied to each message in the batch), there is provision for
10041004header and trailer format strings.
10051005
@@ -1035,7 +1035,8 @@ checks to see if a module-level variable, :data:`raiseExceptions`, is set. If
10351035set, a traceback is printed to :data: `sys.stderr `. If not set, the exception is
10361036swallowed.
10371037
1038- .. note :: The default value of :data:`raiseExceptions` is ``True``. This is
1038+ .. note ::
1039+ The default value of :data: `raiseExceptions ` is ``True ``. This is
10391040 because during development, you typically want to be notified of any
10401041 exceptions that occur. It's advised that you set :data: `raiseExceptions ` to
10411042 ``False `` for production usage.
@@ -1073,7 +1074,7 @@ You can write code like this::
10731074 expensive_func2())
10741075
10751076so that if the logger's threshold is set above ``DEBUG ``, the calls to
1076- :func: ` expensive_func1 ` and :func: ` expensive_func2 ` are never made.
1077+ `` expensive_func1 `` and `` expensive_func2 ` ` are never made.
10771078
10781079.. note :: In some cases, :meth:`~Logger.isEnabledFor` can itself be more
10791080 expensive than you'd like (e.g. for deeply nested loggers where an explicit
0 commit comments