I use java.util.logging.Logger to log in my app :
FileHandler fh=new FileHandler(this.todayFileName, 0, 1, true);
fh.setFormatter(new SimpleFormatter());
Logger.getLogger(rootLogger.getName()).setLevel(Level.ALL);
Logger.getLogger(rootLogger.getName()).addHandler(fh);
but this does work well except that log rotation is enabled.
and i get files :
run.log run.log.1 run.log.2
what I want is to get only one log file, with no rotation enabled.
how do I do that ?
If you run the same application more than once at the same time, java.util.logging will create many log file like run.log run.log.1 run.log.2
And are you sure that your application close correctly, because I already got this problem. Since my application didn’t close correctly, when I started my application, that created a myApplication.log.1