[logback-dev] [JIRA] Commented: (LBCLASSIC-163) LoggingEventVO does not serialize the argument array properly.
Ceki Gulcu (JIRA)
noreply-jira at qos.ch
Fri Oct 23 09:54:44 CEST 2009
[ http://jira.qos.ch/browse/LBCLASSIC-163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11334#action_11334 ]
Ceki Gulcu commented on LBCLASSIC-163:
--------------------------------------
As both Ralph and Joern make valid points, I won't comment further except on PreSerializationTransformer.
The remark about the redundancy of PreSerializationTransformer got me thinking. It is needed because logback differentiates between the live event generated locally, i.e. LoggingEvent, and the serialized event, i.e. LoggingEventVO, both of which are implementations of ILoggingEvent, the type expected internally. The question is then why such differentiation is deemed necessary? Couldn't we have LoggingEvent serializable and be done with it?
Well, LoggingEvent used to be serializable as it was (and still is) in log4j. However, this makes the code in LoggingEvent more complex and harder to maintain. So the separation is justified by code maintainability. as it allows us to have code which is easier to read and understand. Theoretically it also opens the door for other serialization strategies.
> LoggingEventVO does not serialize the argument array properly.
> --------------------------------------------------------------
>
> Key: LBCLASSIC-163
> URL: http://jira.qos.ch/browse/LBCLASSIC-163
> Project: logback-classic
> Issue Type: Bug
> Components: Other
> Affects Versions: 0.917
> Reporter: Ralph Goers
> Assignee: Logback dev list
>
> LoggingEventVO serializes the objects in the argument array by simply calling toString(). This makes it impossible to reconstruct the objects on the remote side. I have fixed this in my fork at git://github.com/rgoers/logback.git by serializing the object if it implements Serializable and converting it to a String if it does not.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the logback-dev
mailing list