On 21.10.2011 12:03, Stefan Bodewig wrote:
On 2011-10-19, Miha Vitorovic wrote:
1) Is there a way to make the log4net server receive anything else
than internally serialized objects , for example, could we send (and
receive) the log events in the XML - as produced by XmlLayout ? If I
understand correctly, not out of the box. Yes/No/Maybe?
By "the log4net server" I assume you mean the RemoteLoggingServer
plugin. This one uses .NET remoting and accepts an array of
LoggingEvent object serialized the way .NET remoting does - i.e. using
binary serialization.
If I create a slightly modified "server", can XmlLayout or some othere
class take the XML produced by XmlLayout and turn it back into the log
event object?
The "turn it back" will be tricky, there is no built-in support for this
and you'd have to code it yourself. This is in addition to writing the
"slightly modified" plugin and a new appender that looked similar to the
RemotingAppender.
Thank you for answer Stefan. Exactly as I suspected. I just needed to
understand the scope of work required.
I was kind of hoping that XmlLayout has some "inverse" functions
available as well.
Thanks and br, Miha