I've started refactoring things, including slight modifications to a few of
the classes within the chainsaw package.  

These changes are only to minimize the dependencies of each class.  I've
created a new interface EventDetailsSink that MyTableModel implements, and
that all of the GUI elements that were binding themselves to the
MyTableModel class are now referring to the much thinner interface.  This
gives us a bit more flexibility to plugin other classes.

I've got the SocketReceiver stuff working, but found out that the plugin
architecture can only be accessed via a log4j.xml config file (it doesn't
load the plugin through PropertyConfigurator).  Will this be an issue in the
future? Be nice for PropertyConfigurator to be able to handle all the things
DOMConfigurator can.

In it's simplest form, I was hoping for the user to define a local log4j
config file that the Chainsaw gui finds or is provided with, and that config
file provides the details of all the Receiver classes that bring in external
events to the local log4j bus, plus the defined ChainsawAppender (and in the
future, more than one).

This works great, but it relies on the local Log4J to be initialised.  I
first modified the Main.initLog4J() method to initialize via a new log4j.xml
file, but eventually found that log4j was being initilized twice!  The first
lot was because the chainsaw package classes have various
Logger.getLogger(this.getClass()) methods, and they get there first.  Then
finally the initLog4J() method is getting called and an additional
ChainsawAppender is being created.  

My initial solution was not to re-initilize log4j by commenting out the
initLog4j() method, but it seems weird to just rely on some class calling
Logger.getLogger() to kick it off.  Is there a way to detect if Log4J is
already configured?

I can probably work around this in the short term by ensuring that
ChainsawAppender is a singleton, but in the longer term, it'd be ideal to
have some more defined way for Chainsaw to log stuff for debug purposes
without interference with the local log4j bus it is trying to "read". (the
other issue I was initially having was that the chainsaw package was logging
what it was doing, and that was appearing in the GUI, which of course
triggered another log event, which went right back to the GUI, etc etc etc
etc, endless loop).

Any ideas?

Hope this makes sense,

_________________________
Paul Smith 
Lawlex Compliance Solutions
phone: +61 3 9278 1511
email: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to