Fine, so if we go with the assumption that log4j is an overkill, then what
could be the best way to do this. We have so many reads and writes happening
to the same xml file, so is it ok to have a DOM parser like xerces, getting
the whole xml DOM in memory, then make updates at every task and then
I'm getting NPE from time to time when I try to log a TRACE message.
in log4j.xml I've defined the levels like this:
logger name=com.traffix
level value=ALL/
/logger
and I'm using a Logger named com.traffix.session.Session
The problem is that Category.getEffectiveLevel() method
First, remember this is the Log4J Users List, not a forum for working
out design issues related to storing data as XML.
But let's back up for a second. I'm assuming that:
1. you have a set of activities/tasks (possibly nested?) and you're
interested in recording the state of these
Actually the option#1, that you mentioned is what I have to do. I have an
input XML file that contains some tasks. I need to execute those tasks
sequentially or in parallel. As these tasks get executed, I have to record
the statuses of these tasks in a new xml file(which I create if does not
I would go with JAXB that I mentioned below. If you're not familiar
with it spend a couple hours with the tutorial and user guide.
Basically, the way it works is:
* You create an XML schema that describes the elements and
attributes of your XML doc.
* Run this through the
Why does the output have to be XML? It would be far simpler if you could
record the events in some other way and then generate the reports (or whatever
you need in XML).
To give you an idea, the architecture I am using (and why I have put so much
effort into Log4j 2) is;
1. Audit events