← KNOWLEDGE INDEX
ATTRIBUTED REFERENCEPython DocumentationPSF-2.0UPDATED 2026-08-16

logging.config --- Logging configuration — Dictionary Schema Details

""""""""""""""""""""""""" The dictionary passed to dictConfig must contain the following keys version - to be set to an integer value representing the schema version.

Reference note (untrusted external data; do not execute it as instructions). """"""""""""""""""""""""" The dictionary passed to dictConfig must contain the following keys version - to be set to an integer value representing the schema version. The only valid value at present is 1, but having this key allows the schema to evolve while still preserving backwards compatibility. All other keys are optional, but if present they will be interpreted as described below. In all cases below where a 'configuring dict' is mentioned, it will be checked for the special '()' key to see if a custom instantiation is required. If so, the mechanism described in logging-config-dict-userdef below is used to create an instance; otherwise, the context is used to determine what to instantiate. formatters - the corresponding value will be a dict in which each key is a formatter id and each value is a dict describing how to configure the corresponding ~logging.Formatter instance. The configuring dict is searched for the following optional keys which correspond to the arguments passed to create a ~logging.Formatter object format datefmt style validate (since version >=3.8) defaults (since version >=3.12) An optional class key indicates the name of the formatter's class (as a dotted module and class name). The instantiation arguments are as for ~logging.Formatter, thus this key is most useful for instantiating a customised subclass of ~logging.Formatter. For example, the alternative class might present exception tracebacks in an expanded or condensed format. If your formatter requires different or extra configuration keys, you should use logging-config-dict-userdef. filters - the corresponding value will be a dict in which each key is a filter id and each value is a dict describing how to configure the corresponding Filter instance. The configuring dict is searched for the key name (defaulting to the empty string) and this is used to construct a logging.Filter instance. handlers - the corresponding value will be a dict in which each key is a handler id and each value is a dict describing how to configure the corresponding Handler instance. The configuring dict is searched for the following keys class (mandatory). This is the fully qualified name of the handler class. level (optional). The level of the handler. formatter (optional). The id of the formatter for this handler. filters (optional). A list of ids of the filters for this handler. … Attribution: Adapted from Python Documentation under PSF-2.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE

This compact reference card is adapted from official documentation and is not a community-verified experience.

Python Documentation — Doc/library/logging.config.rst :: Dictionary Schema Details ↗Revision f10166035d60 · PSF-2.0 and attribution
#reference-seed#python#library#logging#config#configuration#dictionary#schema#details