logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karim Bourouba <kar...@hotmail.com>
Subject RE: Using log4net to write to remote windows event log
Date Tue, 23 Jun 2009 07:07:45 GMT

Sorry, I think you may have missed my point. The event log in Windows is specific to the installation
only. To me, recording things that have taken place on an a different machine in a remote
systems event log doesnt look like good design.

 

Given that you have a lot of different systems you want to log with different logging criteria,
wouldnt logging to a data base be a more prudent move?

 

The ability to view remote logs isnt new with Windows 2008, its been around for a while now.
Bear in mind that this isnt the event log, its called the event collector and is a seperate
service. You need to decide which will be better for you - if you want to rely on this (i.e.
you have a tool that needs the Event Log) then you are going to have to look into this, however
if you want a flexible logging system, then you may want to spend more time with log4net.


 




From: florin.daneliuc@iquestint.com
To: log4net-user@logging.apache.org
Date: Tue, 23 Jun 2009 09:57:31 +0300
Subject: RE: Using log4net to write to remote windows event log




Thanks Karim.
 
In my case I have a number of systems distributed on different computers in a test environment
and I would like certain errors (that would cause my application to stop) to also go into
a central event log in order to be able to only inspect one event log. Emailing in my case
is not something that I would use.
 
The fact that Event Log is a windows technology it not an issue, this application is windows
only, log4net supports Event Log, even if not at it's full capabilities. In order to make
the Event Log appender be able to write to a remote Event Log you only need about 5 lines
of code changed. But of course, I'm not sure about the performance penalty and I don't know
why this capability was "postponed" in the appender (this might clarify this).
 
Also there is a appender that is able to write to remote sinks, RemoteSyslogAppender, which
is mostly Linux only, so using a remote sink is not something new. Windows 2008 seems to have
the ability to collect logs from other computers, so somehow they have thought about something
like this.
 
florin
 



From: Karim Bourouba [mailto:karym6@hotmail.com] 
Sent: Tuesday, June 23, 2009 12:25 AM
To: log4net-user@logging.apache.org
Subject: RE: Using log4net to write to remote windows event log


This isnt something I have ever needed to use log4net for, but there are two possibilities
for you: RemotingAppender and UDPAppender. Both of these appenders appear to be able to deliver
messages to remote apps, at least this is what the log4net page on config examples suggest:
http://logging.apache.org/log4net/release/config-examples.html
 
There is also a SMTPAppender that could also help you out.
 
However, I dont think there is anything ready made for you that will enter these events onto
another systems event log. If this is a Windows environment, then it isnt a great idea anyway.
If you think about it a bit, the event log is used for the system upon which the OS and other
applications are running. To me, it makes very little sense to log events from other systems
here.
 
Have you considered simply using the ADONetAppender to log events to a database somewhere?
This, to me at least, would be a better way of logging events - but then again I dont really
know what it is you are trying to do.


 

> From: florin.daneliuc@iquestint.com
> To: log4net-user@logging.apache.org
> Date: Mon, 22 Jun 2009 18:38:35 +0300
> Subject: Using log4net to write to remote windows event log
> 
> 
> Hello,
> 
> I'm using log4net to log/trace an application and I would like to have cert= ain errors
ending up in the the event log from another computer. Is there a way to do this? (RemoteSyslogAppender?)
> 
> It seems that I could do around the tree and use a ForwardingAppender which together
with a application acting as server on the remote computer would could write this to the event
log, but it looks a little to cumbersome.
> 
> PS I was able to change log4net to write to a remote eventlog, but I would prefer to
use an "untainted" library.
> 
> Thanks,
> florin



View your Twitter and Flickr updates from one place – Learn more!
_________________________________________________________________

MSN straight to your mobile - news, entertainment, videos and more.

http://clk.atdmt.com/UKM/go/147991039/direct/01/
Mime
View raw message