Java FileHandler disable log rotation
I am trying to disable log rotation, to use a file handler,
FileHandler fh = new FileHandler
( "path" + "run.log", 1000000, 1, false);
What I want is one log generated for each run. I don't want to rotate or back up the old file, but using this initialization, I run run.log run.log.1 run.log.2 for every run.
Besides
logger.setUseParentHandlers(false);
set to false.
0
a source to share