logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sclo...@consultant.com
Subject Writing to event viewer only once at login time
Date Wed, 18 Aug 2010 09:24:39 GMT


 I'm writing to the event viewer inside a folder called myApp. My .config looks like the following:

 <appender name="DebugEventLog" type="log4net.Appender.EventLogAppender">
  <param name="ApplicationName" value="myApp" />
  <layout type="log4net.Layout.PatternLayout">
   <param name="ConversionPattern" value="%d [%t] %-5p %c{3} [%P{sessionID}] [%P{ProjectID}]
[%P{PageID}]- %m%n" />
   <level value="ERROR" />
   <eventLogEntryType value="Error" />
   <level value="WARN" />
   <eventLogEntryType value="Warning" />
   <level value="DEBUG" />
   <eventLogEntryType value="Information" />
  <threshold value="ALL"/>

I am making calls like the following:

log4net.ThreadContext.Properties["EventID"] = 15;
log.Info("Info: Hello World");

etc but am noticing that the myapp folder only gets written to at the very beginning when
I log into the application. Am I doing something wrong? 

Anyone with any ideas as to why? Would appreciate any suggestions/ideas/comments that you
may be able to offer.

View raw message