[logback-user] Serialization improvement

Alf Kristian Støyle alf.kristian at gmail.com
Thu Apr 4 12:55:11 CEST 2013


Hi everyone.

First off, my first mail on the mailinglist, thanks for logback, it is
awesome :)

We had a problem in our project that our serialized object graph was way
too large.

After digging, we found that a referenced ch.qos.logback.classic.Logger was
the cause. A serialized object was about 27 kB, after making the referenced
logger static, the serialized size was about 4,7kB

ch.qos.logback.classic.Logger has several transient fields, but parent and
childrenList are not. My guess is that when serializing a logger, you then
implicitly serialize every referenced logger inn the logger tree. Am I
correct?

Since the readResolve method is only dependent on name, every field could
be made transient, problem solved?

Cheers,
Alf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130404/277d57c2/attachment.html>


More information about the Logback-user mailing list