I am trying to do something similar to Appending current time to a new log file each time log4j is initialized.
I am using log4c for logging. I would like to be able to create a new log file with each execution of the application. Is it possible to do this, by only modifying the log4crc config file.
All help will be greatly appreciated
ps: The tag I wanted to used is log4c, but it isn't there in SO
Doesn't seem to be possible via any config file. I had to modify the appender used to name the log file based on the current time. I used the functions
time()
,localtime()
andstrftime()
to create the file name