Saturday 15 September 2012

Python process critical logging messages -


I use Python 2.7.5 with the Logging module I am creating the log message and displaying them to the user. I am making a logger, setting the proper logging level and adding the format to the logger.

Is it possible to add a function that messages are sent at a particular logging level?
I want to process the messages sent to the logging level serious , so I can save and return them later

appreciate any help

You can add multiple handlers to your logger. For each handler, you can define a different log level . For example, you can log on to the console to log a streamhandler and a filehandle with a log stream to file with the log level CRITICAL file. Later Inspection

Explained in this.


No comments:

Post a Comment