logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Erskine <michael.ersk...@ketech.com>
Subject RE: network logging performance
Date Thu, 04 Sep 2008 09:14:13 GMT
> If anyone out there is using "Logging over the network" of any form
> (socket, JMS, Multicast, syslog appenders etc), this topic is for you.
> I'm wondering whether people could comment on their experience setting
> up high performance logging of application data over the network.

For convenience I routinely configure SocketHubAppender instances for all my services and
typically set a threshold of WARN to reduce traffic to important info.

Where performance is deemed more important than the timely delivery of the information I have
custom asynchronous appenders with limited BlockingDeque queues and daemon threads to pump
out data at their leisure.

Where I have multiple services logging across the network to a central place I tend to use
a custom JDBC asynchronous appender.

In other scenarios I have networked systems that require certain log messages as part of a
larger communications protocol. Here I have custom appenders that catch LoggingEvent messages,
translate them and drop them in the outgoing BlockingDeque for the target system (I always
work with queues on complex systems to encourage loose coupling).

I don't tend to pass Java objects over the wire: call me a traditionalist but when I write
my protocols they tend to be human-readable 7-bit ASCII where you can telnet to a server,
issue commands and get replies. This is great for unit testing, troubleshooting, etc. More
recently I've been writing systems that interoperate with 3rd party systems where XML is passed
over the wire (so performance is not of major importance :) ) and here I tend to make Apache
XMLBeans and StAX parsers do all the work but internally I'll drop down to a human readable
(and loggable!) protocol for testing and faster interfacing.

I have a strong belief that any non-trivial networked communications system can be generalised
to IRC!

Just my 2 euros :)

Michael Erskine.

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message