logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gavin Gilmour <gavin.gilm...@gmail.com>
Subject Assembling a XMLLayout event at the other end?
Date Sun, 08 Mar 2009 17:48:28 GMT
Hello there.

I'm having some trouble re-constructing a LoggingEvent at the other end from
a
XML serialized one through a stream. I'm using the log4php project to
generate
and pass an event using LoggerXMLLayout and ultimately try to send it to a
server using log4j which is listening for it. On the server side though,
this
is where I get a little confused.

I'm basically just trying to capture that logging event at the server side
to
get the message, file information, etc. I've looked at using
SimpleSocketServer, SimpleXMLSocketServer and tried a bunch of different
ways
to get it into something I can manage but I've been unsuccessful. I've
managed
to capture a XMLSocketNode using the SimpleXMLSocketServer using the
approach
here [1], but I'm not entirely sure what to do with that and I don't think
it
is what I'm after. Though, I think if I could manage to decode this
XMLSocketNode it'd give me a LoggingEvent which is what I think I'm after(!)

I think my downfall here is that I'm not so much worried about calling any
other appenders to pass the event once I have it though, I'm just wanting to
get the log message and level.

Is there anybody who could offer a hand and perhaps a code snippet or so to
point me in the right direction?

Cheers!

Gavin.

[1] - http://marc.info/?l=log4j-user&m=110381363908634&w=2

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message