Loading...

log4net-user@logging.apache.org

[Prev] Thread [Next]  |  [Prev] Date [Next]

Remote listening of server log stream ... Parrish, Ken Thu Jun 26 12:00:26 2008

I have a scenario where I have a server with several ADO.NET and Windows
services running.  Under normal operation, the applications write log
messages of various severities to a rolling file(s), Windows event
viewer, and e-mail via the SmtpAppender.

 

I would like to set up a logger/appender that would allow remote
listening in on the stream of logging messages.  In this case, the
server runs continuously and is constantly generating a stream of
logging events to a RollingFileAppender.  From time to time, I'd like to
'attach' to the logging output, remotely from a separate host and
'listen in' on the steam of messages being generated.

 

I looked into the UdpAppender in combination with log4netview or
logview4net.  But it seems that the UdpAppender requires specification
of a specific Host and TCP port.  I didn't see a way that I could
connect in to listen to the UDP stream remotely.

 

I also considered writing a separate Windows Service that supported .NET
remoting to which log messages were routed.  I could then 'subscribe'
via .NET remoting and remote message sinks listen in on the log stream.
Seems like a lot of work for a simple task.

 

I noticed the .NET RemotingAppender in the example appender source code,
but am not sure if that will work.

 

Has anyone needed this type of remote 'log listening' capability and
have a suggestion for a solution or approach?

 

Thanks,

 

Ken Parrish

Gomez, Inc.