Python Logging across multiple classes and files; how to configure so as to be easily disabled? -


Currently, I have something like this in all my classes:

  # import logging Logging Logging Logger # logger LOG_FILENAME = 'log.txt' logging to log in. BassicConfig (file name = LOG_FILENAME, level = logging.DEBUG)  

This works well, and I get the output that I want, but I really like all of this kind I would like to do the information in one place, and just be able to do something like import myLogger and then start logging, and then hopefully you can go now

thanks in advance

To set up just logging, check out.

To disable logging, you

  logging. You can use (logging .rritikl)  

Comments