I am using the Apache commons logging library and log4j to generate my log files.
Now I want to create a new file every time I run my program. The current count should be appended to the log file's name.
For example: program_1.log program_2.log program_3.log
Do you know how I could achieve this?
Turning my comment into an answer, as requested:
Any reason why you don't want to use a timestamp? I've found them to be more meaningful as suffixes when I have to look back at log files.