I use java.util.logging.Logger to enter my application:
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 works well, except that log rotation is enabled.
and I get the files:
run.log run.log.1 run.log.2
I want to get only one log file without rotation enabled.
how to do it?
source
share