You can set up the TraceAppender or OutputDebugStringAppender and then use 
DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx).  If 
you have appropriate rights to the target box, a remote DebugView can set up to 
listen on the remote box automatically.  Otherwise, you'll need to run 
DebugView manually in listen mode on the target box before connecting from a 
separate machine.

Another interesting option is to use TelnetAppender, which allows you to telnet 
into the machine in question on a port you configure. Fun.


From: Parrish, Ken [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 04, 2008 6:50 AM
To: [email protected]
Subject: Remote listening of server log stream ...

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.

Reply via email to