Playing with loggers
Shall we spend some time exploring a little bit about loggers? We shall! Let’s do it. Visit the docs for more detailed information about the logging module. Let’s use a simple example, from the documentation, to illustrate the basic usage: def simple_exmaple(): # create logger logger = logging.getLogger('StreamHandler') logger.setLevel(logging.DEBUG) # create console handler and set level to debug ch = logging.StreamHandler() # create formatter formatter = logging.Formatter('%(asctime)s- %(name)s- %(levelname)s- %(message)s') # add formatter to ch ch....