import logging
Python Logging
='my_logs.log',
logging.basicConfig(filenameformat='%(asctime)s %(levelname)s [Line:%(lineno)d] [file: %(filename)s]'\
'[func: %(funcName)s] [process: %(process)d, %(processName)s]'\
'[thread: %(thread)d, %(threadName)s] %(message)s ',
='w',
filemode='%d-%m-%Y %H:%M:%S',
datefmt=logging.DEBUG) level
'DEBUG')
logging.debug('INFO')
logging.info('WARNING')
logging.warning('ERROR')
logging.error('CRITICAL') logging.critical(
= 2 a
= 55 b
print("asdfasf")
asdfasf
int = 10 + 10 x:
f"The answer is {x}!") logging.info(
f"The answer is {x + a}!") logging.info(