Enabled to pass log_config as ConfigParser instance or a file object
This is a new instance of PR #1716 closed accidentally by deleting the forked repository.
Copy of the previous description:
The existing logic for the
log_configoption accepts:
dictorstrrepresenting a JSON or YAML file name to be parsed usinglogging.config.dictConfigstrrepresenting an INI file name to be parsed usinglogging.config.fileConfigThe
logging.config.fileConfig, however, accepts not only the file name, but possibly also an instance ofconfigparser.RawConfigParserand even an open file object. Passing the instance ofconfigparser.RawConfigParser(or its subclass) would be especially useful as this can accumulate configs from multiple files (cp.read()can be called repeatedly on different files updating its config values) instead of just a single one.I am proposing this trivial change to allow the
log_configoption to also accept the*ConfigParserinstance or a general file object.