On Mon, Mar 31, 2014 at 10:21 AM, Ralph Goers <[email protected]>wrote:
> Jackson will do both the JSON and XML if you want. If you can manage to > use the Proxy I think that would be better. > > Ralph > > Hm... I'll investigate. Gary > > > On Mar 31, 2014, at 7:04 AM, Gary Gregory <[email protected]> wrote: > > On Mon, Mar 31, 2014 at 2:36 AM, Ralph Goers > <[email protected]>wrote: > >> Out of curiosity, why does implementing an XML socket server require >> touching the LogEvent? What are XMLLogEventInput and JSONLogEventInput >> going to do that would require that? >> > > My current working implementation uses JAXB annotations on Log4jLogEvent, > no need to deal with messy DOM nonsense. The XML layout can then be a one > liner: JAXB.marshal(logEvent, result). Right now the socket server ends up > also with a one liner to convert from XML to a Log4jLogEvent. > > But I could do it in the existing "proxy" log event instead or a new XML > proxy instead of in Log4jLogEvent. I'm not sure why we'd want to create an > extra object. So I am asking... > > Gary > >> >> Ralph >> >> On Mar 30, 2014, at 8:04 PM, Gary Gregory <[email protected]> wrote: >> >> As I am working on >> LOG4J2-583<https://issues.apache.org/jira/browse/LOG4J2-583>I ran into >> core.impl.Log4jLogEvent.LogEventProxy. >> >> - LogEventProxy is used to move events across threads internally >> - A real Log4jLogEvent is used in the SerializedLayout. >> >> Why the different? >> >> As you answer, if you can avoid committing to Log4jLogEvent that would be >> great as I currently have pending changes there related to >> LOG4J2-583.<https://issues.apache.org/jira/browse/LOG4J2-583> >> >> I am wondering if SerializedLayout should use LogEventProxy or if >> LogEventProxy is a leftover from old development. >> >> Thank you, >> Gary >> -- >> E-Mail: [email protected] | [email protected] >> Java Persistence with Hibernate, Second >> Edition<http://www.manning.com/bauer3/> >> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> >> Spring Batch in Action <http://www.manning.com/templier/> >> Blog: http://garygregory.wordpress.com >> Home: http://garygregory.com/ >> Tweet! http://twitter.com/GaryGregory >> >> >> > > > -- > E-Mail: [email protected] | [email protected] > Java Persistence with Hibernate, Second > Edition<http://www.manning.com/bauer3/> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> > Spring Batch in Action <http://www.manning.com/templier/> > Blog: http://garygregory.wordpress.com > Home: http://garygregory.com/ > Tweet! http://twitter.com/GaryGregory > > > -- E-Mail: [email protected] | [email protected] Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
