Here is the sample code from source: https://docs.python.org/3/howto/logging.html
https://docs.python.org/3/howto/logging.html
import logging logging.basicConfig(filename=\'example.log\', en