Jun-25-2020, 02:19 AM
Hi,
I am running the below code to print the log.
python version is: Out[11]: '3.6.8 |Anaconda 4.3.1 (64-bit)| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)]'
I am running the below code to print the log.
python version is: Out[11]: '3.6.8 |Anaconda 4.3.1 (64-bit)| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)]'
import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s:%(levelname)s: %(message)s', filename='mylog.txt', filemode='w') logging.debug('A debug message') logging.info('Info message') logging.warning('Warning message')it giving errors. Someone help me how to fix it?