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 Ping Xie <px...@caci.com> on 2005/02/18 15:20:00 UTC
EventLogAppender
Hi,
I'm using EventLogAppender to log to windows event log. Does anyone know
how to config it so that it outputs the logging to a specific log instead
of Application log? for example to CACI log in the screenshot shown below.
Thanks.
Ping Xie
CACI
4831 Walden Lane
Lanham, MD 20706
pxie@caci.com
(301) 306-8200 - Main
(301) 306-2829 - Direct
Re: EventLogAppender
Posted by Eric Means <er...@gmail.com>.
Take a look at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog.
There is a key under that for each event log, and under each log
there is a key for each application that should log to that event log,
so you'll need to add a key called whatever your app is named. There
are values you can add to that key, such as for a message file, etc,
but AFAIK just adding the key should
On 4/11/05, Digoron <di...@yahoo.com> wrote:
> Eric,
> I change my config as you said but log4net still using "Application" log
> instead fo mine. I think the problem comes from registory update as you said.
> Could you help me a little bit more. What should I have to do for updating
> registory?
>
>
--
Eric Means
eric.means@gmail.com
http://www.randomtree.org/eric/
Re: EventLogAppender
Posted by Digoron <di...@yahoo.com>.
Eric,
I change my config as you said but log4net still using "Application" log
instead fo mine. I think the problem comes from registory update as you said.
Could you help me a little bit more. What should I have to do for updating
registory?
Re: EventLogAppender
Posted by Ping Xie <px...@caci.com>.
Eric
It works without registry updating.
Thanks.
Ping Xie
CACI
4831 Walden Lane
Lanham, MD 20706
pxie@caci.com
(301) 306-8200 - Main
(301) 306-2829 - Direct
Eric Means <er...@gmail.com>
02/18/2005 11:23 AM
Please respond to
"Log4NET User" <lo...@logging.apache.org>
To
Log4NET User <lo...@logging.apache.org>
cc
Subject
Re: EventLogAppender
I believe you can just set it up like so:
<appender name="EventLogAppender"
type="log4net.Appender.EventLogAppender" >
<applicationName value="log4netTest" />
<logName value="CACI" />
<param name="Threshold" value="INFO" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="Logger:
%c%nNDC: %x%n%n%m%n" />
</layout>
</appender>
If that doesn't work you may need to do a little registry updating to
link the source (the application) to the desired log. (This can be
done with a simple .Net app, and only need be done once per computer.)
On Fri, 18 Feb 2005 09:20:00 -0500, Ping Xie <px...@caci.com> wrote:
>
> Hi,
>
> I'm using EventLogAppender to log to windows event log. Does anyone know
how
> to config it so that it outputs the logging to a specific log instead of
> Application log? for example to CACI log in the screenshot shown below.
>
>
>
> Thanks.
>
> Ping Xie
>
> CACI
> 4831 Walden Lane
> Lanham, MD 20706
> pxie@caci.com
> (301) 306-8200 - Main
> (301) 306-2829 - Direct
>
--
Eric Means
eric.means@gmail.com
http://www.randomtree.org/eric/
Re: EventLogAppender
Posted by Eric Means <er...@gmail.com>.
I believe you can just set it up like so:
<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
<applicationName value="log4netTest" />
<logName value="CACI" />
<param name="Threshold" value="INFO" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="Logger: %c%nNDC: %x%n%n%m%n" />
</layout>
</appender>
If that doesn't work you may need to do a little registry updating to
link the source (the application) to the desired log. (This can be
done with a simple .Net app, and only need be done once per computer.)
On Fri, 18 Feb 2005 09:20:00 -0500, Ping Xie <px...@caci.com> wrote:
>
> Hi,
>
> I'm using EventLogAppender to log to windows event log. Does anyone know how
> to config it so that it outputs the logging to a specific log instead of
> Application log? for example to CACI log in the screenshot shown below.
>
>
>
> Thanks.
>
> Ping Xie
>
> CACI
> 4831 Walden Lane
> Lanham, MD 20706
> pxie@caci.com
> (301) 306-8200 - Main
> (301) 306-2829 - Direct
>
--
Eric Means
eric.means@gmail.com
http://www.randomtree.org/eric/