logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From talktopete <talktop...@gmail.com>
Subject Trying to set up an EXTREMELY SIMPLE event log feature... and failing terribly! Please help a newbie
Date Tue, 11 Nov 2008 21:34:20 GMT

Hi and thanks in advance for the help.
I'm tearing my hair out over here trying to get this to work: a siple logger
that writes to the application section of the event log.

This is using log4net
Here is the app config:
<?xml version="1.0" encoding="utf-8" ?>
    <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />

    <appender name="EventLogAppender"
type="log4net.Appender.EventLogAppender" >
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%date [%thread] %-5level %logger
[%property{NDC}] - %message%newline" />
      <level value="ALL" />
      <appender-ref ref="EventLogAppender" />
here is my code:
  logger = LogManager.GetLogger("EventLogAppender");

No errors, nothing happens! I notice that there are no appenders.
nothing is written to the event log.

I am tearing my hair out trying to figure out what is going on, can somebody
View this message in context: http://www.nabble.com/Trying-to-set-up-an--EXTREMELY-SIMPLE-event-log-feature...-and-failing-terribly%21-Please-help-a-newbie-tp20448428p20448428.html
Sent from the Log4net - Users mailing list archive at Nabble.com.

View raw message