S
Stefan Siegl
Hello
I am using the java.util.logging API and really like it. I used an XML
Handler for each logger storing the information as XML in XML files.
(that´s the default for the FileHandler class). All is going quite fine,
but I will get a lot of different files:
I created the log file as "output.xml" but in the directory are a lot of
other files:
output.xml.1
output.xml
output.xml.lck
output.xml.1.lck
You might say that this is not so dramatic, but I have four loggers and
when my program runs for about two days I will habe about 500 files in
this folder (the number at the end of the files is incremented in these
files).
Here is the code snippet how I create my logger:
[...]
Logger log = Logger.getLogger("Output");
log.setUseParentHandlers(false);
log.setLevel(Level.ALL);
FileHandler xmlLogFile = new
FileHandler([somepath]+"/output.xml",0,1,true);
xmlLogFile.setLevel(Level.FINEST);
log.addHandler(xmlLogFile);
[...]
Thank you
Stefan
I am using the java.util.logging API and really like it. I used an XML
Handler for each logger storing the information as XML in XML files.
(that´s the default for the FileHandler class). All is going quite fine,
but I will get a lot of different files:
I created the log file as "output.xml" but in the directory are a lot of
other files:
output.xml.1
output.xml
output.xml.lck
output.xml.1.lck
You might say that this is not so dramatic, but I have four loggers and
when my program runs for about two days I will habe about 500 files in
this folder (the number at the end of the files is incremented in these
files).
Here is the code snippet how I create my logger:
[...]
Logger log = Logger.getLogger("Output");
log.setUseParentHandlers(false);
log.setLevel(Level.ALL);
FileHandler xmlLogFile = new
FileHandler([somepath]+"/output.xml",0,1,true);
xmlLogFile.setLevel(Level.FINEST);
log.addHandler(xmlLogFile);
[...]
Thank you
Stefan