I want to initialise the logging config using a config file(json or yaml) only once when I call my main module. Is there a concept of context in python like we have in Java where I can take the logger from config whenever I need.
Something like this in the main module -
logging.config.fileConfig('log-conf.json')
I want to use the loaded config in my entire application without having to load the config in each module.
Also, should I do log = logging.getLogger(__name__)
at module level or method level. What is the advantage of doing at method level.