logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Chou <narutoreplic...@gmail.com>
Subject Receiving LoggingEvent From SocketAppender (log4cxx 0.10.0)
Date Thu, 28 May 2009 17:57:56 GMT

I have scoured through the mailing list archive and found nothing that suits
my desired outcome. I want to be receiving a LoggingEvent from a server,
then parsing the event (ie: reconstructing a pattern by calling the
getTimeStamp(), getLevel(), and getMessage() functions (iee: "%d [%p] -
%m%n"), or the \pattern\LoggingEventPatternConverter.cpp). Can anyone
provide some example code for this to happen?

I realize that I can use XMLSocketAppender, coupled with an PatternLayout to
send a simple text string through TCP to the server. However, I need to be
parsing these LoggingEvents in such a way that different tasks are to be
done; this would mean that I would then have to parse a string which would
not be ideal. With a LoggingEvent received from the server, I would be able
to reconstruct, or even send the LoggingEvent to another server if for
different log levels when using \spi\TriggeringEventEvaluator.cpp.

Ruud Bos<http://mail-archives.apache.org/mod_mbox/logging-log4cxx-user/200805.mbox/%3C6df5775b0805200626h61d7f0b2ic1b9edc1a1e3a784@mail.gmail.com%3E>has
had a problem similar to my own, but was solved by switching versions
log4cxx 0.9.7. I do not want addition packages such as Chainsaw, or log4j.

Once again, the question is simple: is there example code around for a
server to receive LoggingEvents generated by SocketAppender? Just for
clarification, is SocketAppender sending a LoggingEvent at all or some other
type of structure? If so, how would the server handle that?

Thanks ahead of time,


View raw message