Commit 55ace65e authored by Jim Fasarakis-Hilliard's avatar Jim Fasarakis-Hilliard Committed by Vinay Sajip

Closes bpo-30168: indent methods in Logger Class (#1295)

parent 3763ea86
......@@ -69,7 +69,7 @@ is the module's name in the Python package namespace.
.. class:: Logger
.. attribute:: Logger.propagate
.. attribute:: Logger.propagate
If this evaluates to true, events logged to this logger will be passed to the
handlers of higher level (ancestor) loggers, in addition to any handlers
......@@ -91,7 +91,7 @@ is the module's name in the Python package namespace.
scenario is to attach handlers only to the root logger, and to let
propagation take care of the rest.
.. method:: Logger.setLevel(lvl)
.. method:: Logger.setLevel(lvl)
Sets the threshold for this logger to *lvl*. Logging messages which are less
severe than *lvl* will be ignored. When a logger is created, the level is set to
......@@ -120,7 +120,7 @@ is the module's name in the Python package namespace.
:meth:`isEnabledFor` will return/expect to be passed integers.
.. method:: Logger.isEnabledFor(lvl)
.. method:: Logger.isEnabledFor(lvl)
Indicates if a message of severity *lvl* would be processed by this logger.
This method checks first the module-level level set by
......@@ -128,7 +128,7 @@ is the module's name in the Python package namespace.
by :meth:`getEffectiveLevel`.
.. method:: Logger.getEffectiveLevel()
.. method:: Logger.getEffectiveLevel()
Indicates the effective level for this logger. If a value other than
:const:`NOTSET` has been set using :meth:`setLevel`, it is returned. Otherwise,
......@@ -138,7 +138,7 @@ is the module's name in the Python package namespace.
etc.
.. method:: Logger.getChild(suffix)
.. method:: Logger.getChild(suffix)
Returns a logger which is a descendant to this logger, as determined by the suffix.
Thus, ``logging.getLogger('abc').getChild('def.ghi')`` would return the same
......@@ -149,7 +149,7 @@ is the module's name in the Python package namespace.
.. versionadded:: 3.2
.. method:: Logger.debug(msg, *args, **kwargs)
.. method:: Logger.debug(msg, *args, **kwargs)
Logs a message with level :const:`DEBUG` on this logger. The *msg* is the
message format string, and the *args* are the arguments which are merged into
......@@ -223,13 +223,13 @@ is the module's name in the Python package namespace.
The *exc_info* parameter can now accept exception instances.
.. method:: Logger.info(msg, *args, **kwargs)
.. method:: Logger.info(msg, *args, **kwargs)
Logs a message with level :const:`INFO` on this logger. The arguments are
interpreted as for :meth:`debug`.
.. method:: Logger.warning(msg, *args, **kwargs)
.. method:: Logger.warning(msg, *args, **kwargs)
Logs a message with level :const:`WARNING` on this logger. The arguments are
interpreted as for :meth:`debug`.
......@@ -238,42 +238,42 @@ is the module's name in the Python package namespace.
identical to ``warning``. As ``warn`` is deprecated, please do not use
it - use ``warning`` instead.
.. method:: Logger.error(msg, *args, **kwargs)
.. method:: Logger.error(msg, *args, **kwargs)
Logs a message with level :const:`ERROR` on this logger. The arguments are
interpreted as for :meth:`debug`.
.. method:: Logger.critical(msg, *args, **kwargs)
.. method:: Logger.critical(msg, *args, **kwargs)
Logs a message with level :const:`CRITICAL` on this logger. The arguments are
interpreted as for :meth:`debug`.
.. method:: Logger.log(lvl, msg, *args, **kwargs)
.. method:: Logger.log(lvl, msg, *args, **kwargs)
Logs a message with integer level *lvl* on this logger. The other arguments are
interpreted as for :meth:`debug`.
.. method:: Logger.exception(msg, *args, **kwargs)
.. 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.
.. method:: Logger.addFilter(filt)
.. method:: Logger.addFilter(filt)
Adds the specified filter *filt* to this logger.
.. method:: Logger.removeFilter(filt)
.. method:: Logger.removeFilter(filt)
Removes the specified filter *filt* from this logger.
.. method:: Logger.filter(record)
.. method:: Logger.filter(record)
Applies this logger's filters to the record and returns a true value if the
record is to be processed. The filters are consulted in turn, until one of
......@@ -282,24 +282,24 @@ is the module's name in the Python package namespace.
further processing of the record occurs.
.. method:: Logger.addHandler(hdlr)
.. method:: Logger.addHandler(hdlr)
Adds the specified handler *hdlr* to this logger.
.. method:: Logger.removeHandler(hdlr)
.. method:: Logger.removeHandler(hdlr)
Removes the specified handler *hdlr* from this logger.
.. method:: Logger.findCaller(stack_info=False)
.. method:: Logger.findCaller(stack_info=False)
Finds the caller's source filename and line number. Returns the filename, line
number, function name and stack information as a 4-element tuple. The stack
information is returned as ``None`` unless *stack_info* is ``True``.
.. method:: Logger.handle(record)
.. method:: Logger.handle(record)
Handles a record by passing it to all handlers associated with this logger and
its ancestors (until a false value of *propagate* is found). This method is used
......@@ -307,12 +307,12 @@ is the module's name in the Python package namespace.
Logger-level filtering is applied using :meth:`~Logger.filter`.
.. method:: Logger.makeRecord(name, lvl, fn, lno, msg, args, exc_info, func=None, extra=None, sinfo=None)
.. method:: Logger.makeRecord(name, lvl, fn, lno, msg, args, exc_info, func=None, extra=None, sinfo=None)
This is a factory method which can be overridden in subclasses to create
specialized :class:`LogRecord` instances.
.. method:: Logger.hasHandlers()
.. method:: Logger.hasHandlers()
Checks to see if this logger has any handlers configured. This is done by
looking for handlers in this logger and its parents in the logger hierarchy.
......@@ -1256,4 +1256,3 @@ with the :mod:`warnings` module.
package available from this site is suitable for use with Python 1.5.2, 2.1.x
and 2.2.x, which do not include the :mod:`logging` package in the standard
library.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment