I have log4j logging inside of Orion 1.5.2 under JDK 1.3.1_01.
I have the JDBCAppender working for logging events initiated
inside of the web and ejb containers.  However, I also have
external applications running outside of the app server that
I need to have logged via the same JDBCAppender.  I use a
JMSAppender to log from those external apps.  This is where
things got a little sticky.  Since the JMSAppender must serialize
the LoggingEvent object, its reference to the Category is lost
for obvious reasons.  However, after this Logging event arrives
into the JMS Topic, the JDBCAppender does not  like the
null instance variables LoggingEvent.category and
LoggingEvent.fqnOfCategoryClass.  I have attached a
workaround for this problem (lines 828 - 837) in the file
JDBCAppender.java.  
A related issue I experienced with the interaction between
these two appenders  is that the deserialized event is
(of course) unable to lookup its location information context
(e.g. file, line, etc.) but CAN use the cached LocationInfo object
that was deserialized along with the LoggingEvent.  A problem
occurs when the JDBCAppender internally creates a new event
from the state of the deserialized event.  This new event does
not have the cached LocationInfo object and can not look it up.
I attached another workaround (lines 457 - 475) in the file
JDBCLogger.java.
I now have it working for my purposes.  Hopefully my attached
changes will further illuminate the issues.  I am sure there are
solutions that consider more than my specific workarounds.
Thank you for these useful appenders.  Please let me know if I
need to further explain these issues and workarounds.

- Joe

Attachment: JDBCAppender.java
Description: Binary data

Attachment: JDBCLogger.java
Description: Binary data

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

Reply via email to