I have a servlet deployed. I am a little confused about the log files being generated. particularly i am not sure which one to look at.
There are several generated with the same data.
I am using the following code to initialize my Filehandler.
Logger logger = Logger.getLogger(Global.TAG);
String path = realPath + "myappname" + ".%g.log";
FileHandler fh = new FileHandler(path, 10240000, 1000, true);
logger.addHandler(fh);
logger.setLevel(Level.ALL);
SimpleFormatter formatter = new SimpleFormatter();
fh.setFormatter(formatter);
logInfo("Logger Configured!");
Notice that i have %g
in there for when files are rotated.
The files generated are something like this.
myappname.0.log
myappname.0.log.1
myappname.0.log.2
myappname.0.log.3
myappname.0.log.4
myappname.0.log.5
myappname.0.log.6
myappname.1.log
myappname.1.log.2
myappname.1.log.4
myappname.1.log.5
myappname.2.log
myappname.2.log.1
myappname.2.log.2
myappname.2.log.3
myappname.2.log.4
myappname.2.log.5
myappname.2.log.6
myappname.3.log
myappname.3.log.1
myappname.3.log.3
myappname.3.log.6
The servlet was undeployed and redeployed several times in the last 2-3 weeks in which the logs were generated.
What i have noticed is that logs with the same name (except the last bit after the ".log" part) have the same logging statements. Some files have more and some less.
What gives? How should i be reading this?