summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2010-09-21 11:25:39 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2010-09-21 11:25:39 (GMT)
commitc84f01698874902863396e82a248f5fd6ec59d0e (patch)
treeff6f8d60ab21f6aeb1d4ca5c35ba4555b5e697bf /Doc
parentceff5668864f319d05a781e8eef591b014ae2751 (diff)
downloadcpython-c84f01698874902863396e82a248f5fd6ec59d0e.zip
cpython-c84f01698874902863396e82a248f5fd6ec59d0e.tar.gz
cpython-c84f01698874902863396e82a248f5fd6ec59d0e.tar.bz2
Added some methods to LoggerAdapter, and updated documentation.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/logging.rst19
1 files changed, 11 insertions, 8 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index 5d62d50..c0e114441 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -2599,8 +2599,8 @@ should, then :meth:`flush` is expected to do the needful.
.. method:: flush()
For a :class:`MemoryHandler`, flushing means just sending the buffered
- records to the target, if there is one. Override if you want different
- behavior.
+ records to the target, if there is one. The buffer is also cleared when
+ this happens. Override if you want different behavior.
.. method:: setTarget(target)
@@ -2972,15 +2972,18 @@ __ context-info_
'extra'. The return value is a (*msg*, *kwargs*) tuple which has the
(possibly modified) versions of the arguments passed in.
-In addition to the above, :class:`LoggerAdapter` supports all the logging
+In addition to the above, :class:`LoggerAdapter` supports the following
methods of :class:`Logger`, i.e. :meth:`debug`, :meth:`info`, :meth:`warning`,
-:meth:`error`, :meth:`exception`, :meth:`critical` and :meth:`log`. These
-methods have the same signatures as their counterparts in :class:`Logger`, so
-you can use the two types of instances interchangeably.
+:meth:`error`, :meth:`exception`, :meth:`critical`, :meth:`log`,
+:meth:`isEnabledFor`, :meth:`getEffectiveLevel`, :meth:`setLevel`,
+:meth:`hasHandlers`. These methods have the same signatures as their
+counterparts in :class:`Logger`, so you can use the two types of instances
+interchangeably.
.. versionchanged:: 3.2
- The :meth:`isEnabledFor` method was added to :class:`LoggerAdapter`. This
- method delegates to the underlying logger.
+ The :meth:`isEnabledFor`, :meth:`getEffectiveLevel`, :meth:`setLevel` and
+ :meth:`hasHandlers` methods were added to :class:`LoggerAdapter`. These
+ methods delegate to the underlying logger.
Thread Safety