[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4net-user
Subject:    RE: Using log4net to write to remote windows event log
From:       Karim Bourouba <karym6 () hotmail ! com>
Date:       2009-06-23 7:07:45
Message-ID: BLU127-W25ADE3B353B1A2EE24AADA95360 () phx ! gbl
[Download RAW message or body]

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/


[Attachment #3 (text/html)]

<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Sorry, I think you may have missed my point. The event log in&nbsp;Windows is \
specific to the installation only. To me, recording things that have taken place on \
an&nbsp;a different machine in a remote systems event log doesnt look like good \
design.<BR> &nbsp;<BR>
Given that you have a lot of different systems you want to log with different logging \
criteria, wouldnt logging to a&nbsp;data base be a more prudent move?<BR> &nbsp;<BR>
The&nbsp;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&nbsp;(i.e. you have a tool that needs the Event Log) \
then you are going to&nbsp;have to look into this, however if you want a flexible \
logging system, then you may want to spend more time with \
log4net.<BR><BR><BR>&nbsp;<BR> <BR>
<HR id=stopSpelling>
From: florin.daneliuc@iquestint.com<BR>To: log4net-user@logging.apache.org<BR>Date: \
Tue, 23 Jun 2009 09:57:31 +0300<BR>Subject: RE: Using log4net to write to remote \
windows event log<BR><BR> <STYLE>
.ExternalClass .EC_hmmessage P
{padding-right:0px;padding-left:0px;padding-bottom:0px;padding-top:0px;}
.ExternalClass BODY.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>

<DIV dir=ltr align=left><SPAN class=EC_572474206-23062009><FONT color=#0000ff \
face=Arial>Thanks Karim.</FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN \
class=EC_572474206-23062009><FONT color=#0000ff face=Arial></FONT></SPAN>&nbsp;</DIV> \
<DIV dir=ltr align=left><SPAN class=EC_572474206-23062009><FONT color=#0000ff \
face=Arial>In my case I have a number of systems distributed on different computers \
in&nbsp;a test environment&nbsp;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.</FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN \
class=EC_572474206-23062009><FONT color=#0000ff face=Arial></FONT></SPAN>&nbsp;</DIV> \
<DIV dir=ltr align=left><SPAN class=EC_572474206-23062009><FONT color=#0000ff \
face=Arial>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).</FONT></SPAN></DIV> <DIV dir=ltr \
align=left><SPAN class=EC_572474206-23062009><FONT color=#0000ff \
face=Arial></FONT></SPAN>&nbsp;</DIV> <DIV dir=ltr align=left><SPAN \
class=EC_572474206-23062009><FONT color=#0000ff face=Arial>Also there is a appender \
that is able to write to remote sinks, <FONT color=#000000>RemoteSyslogAppender, \
which is mostly Linux only, so using a remote sink is not something new. \
</FONT></FONT></SPAN><SPAN class=EC_572474206-23062009><FONT face=Arial>Windows 2008 \
seems to have the ability to collect logs from other computers, so somehow they have \
thought about something like this.</FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN \
class=EC_572474206-23062009><FONT face=Arial></FONT></SPAN>&nbsp;</DIV> <DIV dir=ltr \
align=left><SPAN class=EC_572474206-23062009><FONT \
face=Arial>florin</FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN \
class=EC_572474206-23062009><FONT face=Arial></FONT></SPAN>&nbsp;</DIV><BR> <DIV \
dir=ltr lang=en-us class=EC_OutlookMessageHeader align=left> <HR>
<FONT face=Tahoma><B>From:</B> Karim Bourouba [mailto:karym6@hotmail.com] \
<BR><B>Sent:</B> Tuesday, June 23, 2009 12:25 AM<BR><B>To:</B> \
log4net-user@logging.apache.org<BR><B>Subject:</B> RE: Using log4net to write to \
remote windows event log<BR></FONT><BR></DIV> <DIV></DIV>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: <A \
href="http://logging.apache.org/log4net/release/config-examples.html">http://logging.apache.org/log4net/release/config-examples.html</A><BR>&nbsp;<BR>There \
is also a SMTPAppender that could also help you out.<BR>&nbsp;<BR>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.<BR>&nbsp;<BR>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.<BR><BR><BR>&nbsp;<BR><BR>&gt; From: \
florin.daneliuc@iquestint.com<BR>&gt; To: log4net-user@logging.apache.org<BR>&gt; \
Date: Mon, 22 Jun 2009 18:38:35 +0300<BR>&gt; Subject: Using log4net to write to \
remote windows event log<BR>&gt; <BR>&gt; <BR>&gt; Hello,<BR>&gt; <BR>&gt; 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?)<BR>&gt; <BR>&gt; 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.<BR>&gt; <BR>&gt; PS I was able to change log4net to write to a remote \
eventlog, but I would prefer to use an "untainted" library.<BR>&gt; <BR>&gt; \
Thanks,<BR>&gt; florin<BR><BR> <HR>
View your Twitter and Flickr updates from one place – <A \
href="http://clk.atdmt.com/UKM/go/137984870/direct/01/">Learn more!</A><br /><hr \
/>View your Twitter and Flickr updates from one place – <a \
href='http://clk.atdmt.com/UKM/go/137984870/direct/01/' target='_new'>Learn \
more!</a></body> </html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic