I am trying to add logging to my script,and followed python logging tutorial
example code
import logging logging.basicConfig(filename='example.log',level=logging.DEBUG) logging.debug('This message should go to the log file') logging.info('So should this') logging.warning('And this, too')
But I cannot find the example.log
file at the directory where the script is in.And as I call os.getcwd()
,it returns C:\\users\\eda
.No log is there either.