Log4net 事件日志已满
我正在使用 log4net 事件日志附加程序记录到事件查看器,然后出现以下异常:
无法使用源源名称 Win32 写入事件日志 事件日志已满。
<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>
您能否让我知道解决方法是什么? 谢谢, 阿贾伊
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
右键单击事件名称,转到属性...选中“当达到最大事件日志大小时...”的相应选项
Right click the event name,go to properties ..check the appropriate option for "When maximum event log size is reached...
错误应该足够清楚,您的事件日志已满 - 所以您必须对此采取措施。
增加事件日志的大小,或删除/清理旧事件,
请参阅 http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/fn_fulllog.mspx?mfr=true和http://www.howtogeek。 com/howto/windows/fixing-the-event-log-is-full-error-on-windows-xp/
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/