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