On Apr 17, 2007, at 10:42 PM, Paul Smith wrote:
Hi all,
I've completed porting the remaining Receiver classes to the
sandbox area. The below patch is what I have locally, and taking
the generated jar and adding it as a dependency to Chainsaw makes
everything compile nicely. I am not able to do any testing on this
as yet, and figure a patch review is probably worthwhile at this
stage.
These are all baseline copies from the log4j trunk. The DB* stuff
needed more fiddling than the others. I had to comment out all
internal logging statements in the DBAppender because
AppenderSkeleton in 1.2 does not provide that. There is no concept
of a sequence # either, so I munged that in the insert statement so
that all the inserts have '0' as a sequence value. Given
LoggingEvent in 1.2 doesn't have that anyway, I figure that's ok..
Curty, Scott and others, any chance you could review this please
before I check it in?
(Note: I'll fix checkstyle issues later, I know there's tabs
everywhere sorry)
Maybe you could fake out the getLogger() calls like
private static final class LogLogger {
public void debug(final String msg) {
LogLog.debug(msg);
}
public void warn(final String msg) {
LogLog.warn(msg);
}
public void error(final String msg, final Throwable ex) {
LogLog.error(msg, ex);
}
}
private static final LogLogger getLogger() {
return new LogLogger();
}
and access the "sequence number" through another private method:
private static long getSequenceNumber(final LoggingEvent event) {
return 0;
}
That should allow the body of the functional methods to be unchanged
between 1.3 and 1.2.x. Only the kludge methods would need to change
to switch between 1.3 and 1.2.
In DBReceiverJob.java, I'm unclear why you are doing:
Object msg = null;
...
msg = rs.getString(3);
instead of:
Object msg = rs.getString(3);
p.s. Only my Aunt Louise gets to call me Curty
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]