Log4net event log full

1.1k Views Asked by At

I am using log4net event log appender to log to event viewer and after I am getting the following exception:

Unable to write to event log using source source name Win32exception event log is full.

    <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender">
          <filter type="log4net.Filter.LevelRangeFilter">
            <param name="LevelMin" value="ERROR"/>
            <param name="LevelMax" value="ERROR"/>
          </filter>
          <!--The name of the application-->
          <applicationName value="eventsource"/>
          <layout type="log4net.Layout.PatternLayout">
            <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline"/>
          </layout>
    </appender>

Could you please let me know what will be the workaround for this? Thanks, Ajai

2

There are 2 best solutions below

1
On

The error should be clear enough, your event log is full - so you gotta do something about that.

Either increase the size of your event log, or delete/clean up old events,

See http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/fn_fulllog.mspx?mfr=true and http://www.howtogeek.com/howto/windows/fixing-the-event-log-is-full-error-on-windows-xp/

0
On

Right click the event name,go to properties ..check the appropriate option for "When maximum event log size is reached...