Socket appenders and receivers use java.io ObjectOutputStream / ObjectInputStream for serialization. This can be overriden in SocketAppender by setting an ObjectWriter. However, there is no corresponding ObjectReader at the SocketReceiver. Moreover, ServerSocketAppender does not use ObjectWriter.
The attached patches solves both these issues. They add ObjectWriter to the ServerSocketAppender and a new ObjectReader to both receivers. This allows custom protocols to be used between any pair of socket appender / receiver by creating derived classes.
The same patches are available at https://github.com/jopereira/logback.
|