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 Steve Slatcher <st...@scientia.com> on 2005/05/23 16:29:16 UTC
EventLogAppender problems
Hi
I am using log4net 1.2.9 beta and struggling to configure an
EventLogAppender. I am trying to use the config file below, which hopefully
indicates, to the human eye at least, the effect I want to achieve.
I have created a source called "DSC" in the Application log and written to
that successfully using the MS Framework EventLog class.
I can also succesfully write to the Event Log using log4net, but...
The source of the messages is "ASP.NET 2.0.50215.0". Did I mention I was
using the ASP.NET beta?
The type is "Information"
The layout of the message seems to be some sort of default, which is
actually quite nice, but not what is specified in the config file.
Any help gratefully recieved
Steve Slatcher
<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender"
>
<applicationName value="Application" />
<applicationName value="DSC" />
<mapping>
<level value="ERROR" />
<eventLogEntryType value="Error" />
</mapping>
<mapping>
<level value="DEBUG" />
<eventLogEntryType value="Information" />
</mapping>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%ndc] -
%message%newline" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="RollingFile" />
</root>
<System>
<level value="ERROR" />
<appender-ref ref="EventLog" />
</System>
</log4net>
Re: EventLogAppender problems
Posted by Steve Slatcher <st...@scientia.com>.
> <applicationName value="Application" />
Oops. Should've been logName. Still doesn't work.
Re: EventLogAppender problems (SOLVED)
Posted by Steve Slatcher <st...@scientia.com>.
Obvious (now) misconfiguration! Sorry for disturbing you (if I did).