I have implemented the logging using python standard module(I refered python offical docs). I have created a separate logger.py file and return logger from this. In different modules I have imported and used for logging purpose.
Now I want to have a functionality that will enable/disable or on/off the logging. For this I am thinking to define a boolean flag, since I have many files this approach forcing me to write if condition
at each line wherever I am logging.
Is there a better approach to achieve the same task?