Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
0.9.19
-
None
-
Software platform
Description
I'm attempting to use a SocketAppender to send log events over the network to a custom appender hosted by SimpleSocketServer. My custom appender needs to work with my arguments as objects, rather than strings. I noticed that the string representations of my arguments were being passed across the network, and traced through to the code shown below (from ch.qos.logback.classic.spi.LoggingEventVO). Would you consider sending the object's serialized form instead (assuming the object is serializable)?
private void writeObject(ObjectOutputStream out) throws IOException {
out.defaultWriteObject();
out.writeInt(level.levelInt);
if (argumentArray != null) {
int len = argumentArray.length;
out.writeInt(len);
for (int i = 0; i < argumentArray.length; i++) {
if (argumentArray[i] != null)
else
{ out.writeObject(NULL_ARGUMENT_ARRAY_ELEMENT); } }
} else
}