I have a program which is set to run for a long period of time and I keep a log file to keep track of the events. However, the size of the log file is getting bigger as time goes by.
I would like to keep a log file everyday instead of just one log file for everything.
This is my current code:
logging.basicConfig(filename='myfile.log',level=logging.INFO)
I want to set a date for the log file such that, it will become myfile_DDMMYYYY.log and creates another log file everyday with the different date.
Any idea if it is possible to be done ?