Logging with Quartz.net
Posted
by Young Ninja
on Stack Overflow
See other posts from Stack Overflow
or by Young Ninja
Published on 2010-06-08T21:57:20Z
Indexed on
2010/06/08
22:02 UTC
Read the original article
Hit count: 418
I will shamelessly state that I have little experience with Log4Net... I only just installed it, but it won't capture log events from Quartz.net, which is a scheduling library. Apparently Quartz.net uses Commons Logging and that needs to be configured to point to my Log4Net settings. Unfortunately, it doesn't seem to work. Help is appreciated:
<configSections>
...
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
<section name="quartz" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="commonLogging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging"/>
</configSections>
<!-- Log4net error handling -->
<log4net>
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
<param name="File" value="Admin/LabSlice.log" />
<param name="AppendToFile" value="true" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%d [%t] %-5p %c %m%n" />
</layout>
</appender>
<root>
<level value="INFO" />
<appender-ref ref="LogFileAppender" />
</root>
</log4net>
<!-- Commons logging (Quart.net logs) -->
<commonLogging>
<logging>
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net">
<arg key="configType" value="INLINE" />
</factoryAdapter>
</logging>
</commonLogging>
© Stack Overflow or respective owner