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?
Thanks