You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by "Parrish, Ken" <KP...@gomez.com> on 2008/02/04 15:50:27 UTC
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.
RE: Remote listening of server log stream ...
Posted by "Parrish, Ken" <KP...@gomez.com>.
Jimmie,
These are great suggestions. The TelnetAdapter looks like it's just the ticket for my application testing at present, but the others might be a better long term solution.
Thanks,
Ken Parrish
Gomez, Inc.
-----Original Message-----
From: Jimmie Fulton [mailto:jimmie_fulton@gensler.com]
Sent: Thursday, February 07, 2008 9:47 PM
To: Log4NET User
Subject: RE: Remote listening of server log stream ...
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:KParrish@gomez.com]
Sent: Monday, February 04, 2008 6:50 AM
To: log4net-user@logging.apache.org
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.
Multi-app centralized logging vs. per app logging and background process consolidation
Posted by Mike Baker <mi...@harmonicinc.com>.
A previous generation application suite simply uses OutputDebugString( )
to achieve centralized logging for a multi-app suite running on a single
host. The next generation replacement is in the design stage, and will
be distributed. It is desired to maintain an efficient and reliable
means of centralized logging.
One idea is some sort of publish-subscribe model, whereby each app
writes to a publisher, with the publisher responsible for delivering the
messages to each subscriber.
Another idea is to have each app use a RollingFileAppender, and have a
background process examine the time tags to assemble a centralized log
from the individual files. Obviously time-syncing will be necessary
between hosts, and a means to determine any offsets.
Both of these approaches may involve more work than we would like to
budget for, and may have inherent time-order ambiguity for messages that
are close together due to OS context switching.
Any comments on these approaches? Any other ideas on how better to do
this?
Thanks,
-Mike
RE: Remote listening of server log stream ...
Posted by Jimmie Fulton <ji...@gensler.com>.
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:KParrish@gomez.com]
Sent: Monday, February 04, 2008 6:50 AM
To: log4net-user@logging.apache.org
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.
RE: Remote listening of server log stream ...
Posted by Scott Deboy <sd...@comotivsystems.com>.
Chainsaw provides a LogFilePatternReceiver that can tail log files on a
local file system or available via HTTP.
Chainsaw also includes VFSLogFilePatternReceiver, which will let you
tail log files remotely when if the files are accessible via ssh or any
of the file systems supported by Jakarta commons-vfs
(http://commons.apache.org/vfs/filesystems.html)
Scott Deboy
Principal Engineer
COMOTIV SYSTEMS
111 SW Columbia Street Ste. 950
Portland, OR 97201
Office: 503.224.7496
Direct Line: 503.821.6482
Cell: 503.997.1367
Fax: 503.222.0185
sdeboy@comotivsystems.com <ma...@comotivsystems.com>
www.comotivsystems.com <http://www.comotivsystems.com/>
________________________________
From: Parrish, Ken [mailto:KParrish@gomez.com]
Sent: Monday, February 04, 2008 6:50 AM
To: log4net-user@logging.apache.org
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.