Python: an example of how to use logging module