Lines Matching full:logging
1 :mod:`logging.config` --- Logging configuration
4 .. module:: logging.config
5 :synopsis: Configuration of the logging module.
10 **Source code:** :source:`Lib/logging/config.py`
17 * :ref:`Basic Tutorial <logging-basic-tutorial>`
18 * :ref:`Advanced Tutorial <logging-advanced-tutorial>`
19 * :ref:`Logging Cookbook <logging-cookbook>`
23 This section describes the API for configuring the logging module.
30 The following functions configure the logging module. They are located in the
31 :mod:`logging.config` module. Their use is optional --- you can configure the
32 logging module using these functions or by making calls to the main API (defined
33 in :mod:`logging` itself) and defining handlers which are declared either in
34 :mod:`logging` or :mod:`logging.handlers`.
38 Takes the logging configuration from a dictionary. The contents of
39 this dictionary are described in :ref:`logging-config-dictschema`
49 corresponding to an actual logging level.
58 has a :meth:`configure` method. The :mod:`logging.config` module
82 Reads the logging configuration from a :mod:`configparser`\-format file. The
84 :ref:`logging-config-fileformat`.
112 in the logging configuration.
120 * Use of a configuration file where logging configuration is just part
133 :const:`DEFAULT_LOGGING_CONFIG_PORT` is used. Logging configurations will be
197 The logging configuration functionality tries to offer convenience, and in part this
199 objects used in logging configuration - for example, as described in
200 :ref:`logging-config-dict-userdef`. However, these same mechanisms (importing
213 Describing a logging configuration requires listing the various
217 These objects aren't limited to those provided by the :mod:`logging`
221 objects and connections is defined in :ref:`logging-config-dict-connections`
239 :ref:`logging-config-dict-userdef` below is used to create an instance;
246 configure the corresponding :class:`~logging.Formatter` instance.
250 :class:`~logging.Formatter` object:
259 arguments are as for :class:`~logging.Formatter`, thus this key is
261 :class:`~logging.Formatter`. For example, the alternative class
264 keys, you should use :ref:`logging-config-dict-userdef`.
271 empty string) and this is used to construct a :class:`logging.Filter`
298 class : logging.StreamHandler
304 class : logging.handlers.RotatingFileHandler
311 :class:`logging.StreamHandler`, using ``sys.stdout`` as the underlying
313 :class:`logging.handlers.RotatingFileHandler` with the keyword arguments
346 as described in the section on :ref:`logging-config-dict-incremental`.
380 over the wire as pickled dicts to a socket listener. Thus, the logging
389 The schema describes a set of logging objects - loggers,
453 which detail their configuration. In some places, the logging system
479 ``brief``, is a standard :class:`logging.Formatter` instance with the
482 result in a :class:`logging.Formatter` initialized with those two format
499 standard :class:`logging.Formatter` instances are created. The
564 automatically be converted to the value ``logging.DEBUG``, and the
569 objects which are not known to the :mod:`logging` module. For
570 example, consider :class:`logging.handlers.MemoryHandler`, which takes
600 class: logging.handlers.SMTPHandler
647 from logging.config import BaseConfigurator
676 not provide functionality to cover certain aspects of logging. For example,
677 you cannot configure :class:`~logging.Filter` objects, which provide for
679 If you need to have instances of :class:`~logging.Filter` in your logging
709 logged. Level values are :func:`eval`\ uated in the context of the ``logging``
748 in the ``logging`` package's namespace). The ``level`` is interpreted as for
752 handler. If blank, a default formatter (``logging._defaultFormatter``) is used.
756 The ``args`` entry, when :func:`eval`\ uated in the context of the ``logging``
763 ``logging`` package's namespace, is the keyword argument dict to the constructor
828 class=logging.Formatter
832 <logging-config-dictschema-formatters>`.
844 Module :mod:`logging`
845 API reference for the logging module.
847 Module :mod:`logging.handlers`
848 Useful handlers included with the logging module.