[logback-user] Use multiple receivers to log multiple remote server appenders
chamilton-dev at compucafe.com
Mon Jul 15 17:05:58 CEST 2013
I have multiple web servers configured in a cluster. I have set up a "server" appender on each instance of the application.
I have used the Receiver example to create a program that will connect to the remote server appenders and log the messages received from each cluster member to a single remote file.
The problem I have is identifying the source server in the remote remote log file.
What I'm looking for is a way to identify the source server of each message. I have enhanced the SocketReceiver and added a field called ReceiverAlias which is set in logback.xml. Currently I am prepending this string to the log message. This works but doesn't look or feel right. I'm thinking that there ought to be a better way.
Is there an established pattern for this use case?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Logback-user