logging.config.fileConfig(fname, defaults=None, disable_existing_loggers=True)
Reads the logging configuration from a configparser
-format file. The format of the file should be as described in Configuration file format. This function can be called several times from an application, allowing an end user to select from various pre-canned configurations (if the developer provides a mechanism to present the choices and load the chosen configuration).
Parameters: |
|
---|
Changed in version 3.4: An instance of a subclass of RawConfigParser
is now accepted as a value for fname
. This facilitates:
- Use of a configuration file where logging configuration is just part of the overall application configuration.
- Use of a configuration read from a file, and then modified by the using application (e.g. based on command-line parameters or other aspects of the runtime environment) before being passed to
fileConfig
.
Please login to continue.