Quartz.Net - General Logging with log4net

I am trying to implement Quartz.Net. While there is no registration, everything works (debug output shows "no configuration section was found - suppress log output").

When logging is enabled, I get the following error: Failed to get the configuration for Common.Logging from the configuration section "common / logging" .

Internal deletion: An error occurred while creating the configuration section handler for general / logging: cannot create type "Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net"

I used several resources like this to change my configuration, but as far as I can see, this should be correct.

My app.config:

<configSections> <section name="quartz" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <sectionGroup name="common"> <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /> </sectionGroup> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> </configSections> <common> <logging> <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net"> <arg key="configType" value="INLINE" /> </factoryAdapter> </logging> </common> <log4net> <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender"> <layout type="log4net.Layout.PatternLayout"> <param name="ConversionPattern" value="%-6p%d{yyyy-MM-dd hh:mm:ss} – %m%n" /> </layout> </appender> <root> <level value="DEBUG" /> <appender-ref ref="ConsoleAppender" /> </root> </log4net> <quartz> <add key="quartz.scheduler.instanceName" value="Driver.Service.Scheduler" /> <add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz" /> <add key="quartz.threadPool.threadCount" value="10" /> <add key="quartz.threadPool.threadPriority" value="2" /> <add key="quartz.jobStore.misfireThreshold" value="60000" /> <add key="quartz.jobStore.type" value="Quartz.Simpl.RAMJobStore, Quartz" /> </quartz> 

I referenced the following assemblies:
quartz.dll, version 2.01.100
common.logging.dll, version 2.0.0.0
common.logging.log4net.dll, version 2.0.0.0
log4net.dll, version 1.2.10.0

I can not find the cause of the error. All help is appreciated, apparently, I forgot something ...

+6
source share
3 answers

You can verify that Common.Logging.Log4net.dll is copied to the output folder of your buffer.

Are you also sure that you do not have an internal exception in your internal exception (or, possibly, several levels of internal exceptions)?

+5
source

We had a similar situation when we switched to the new version of Common.Logging.Log4Net, where the DLL name was changed to Common.Logging.Log4Net1211 from Common.Logging.Log4Net.

So, we changed the configuration file to change the name of the DLL:

 <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net1211"> 

In any case, the error definitely indicates the absence of a DLL.

+11
source

I'm not sure, but in your general logging configuration section, its log4net once and its log4Net once (capital letter):

  <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net"> 
0
source

All Articles