I am trying to use the Common.Logging assembly to replace the default nHibernate log4net log.
I added a link to my project:
Common.Logging.dll v2.0
NHibernate.Logging.CommonLogging.dll v1.2.0.4000
and then added the following to my Web.config:
<add key="nhibernate-logger" value="NHibernate.Logging.CommonLogging.CommonLoggingLoggerFactory, Hibernate.Logging.CommonLogging"/>
The purpose of my ulitmate is to replace Log4net with Enterprise Library 5.0, but I'm just doing it step by step for now.
When I run my application, I get the following exception:
The type initializer for 'NHibernate.Cfg.Configuration' threw an exception. => The type initializer for 'NHibernate.LoggerProvider' threw an exception. => The type initializer for 'NHibernate.LoggerProvider' threw an exception. => Unable to instantiate: => Value cannot be null.\r\nParameter name: type at NHibernate.LoggerProvider.LoggerFor(Type type) at NHibernate.Cfg.Configuration..cctor()
Is there something I am missing to use Common.Logging with nHibernate? I tried to follow the instructions that I found on the Internet, but it does not work, and I can not find a solution :(
I am using NHibernate v3.2.0.4000.
PS. This is my first post on this site, so sorry if the formatting is wrong, I will be glady to accept constructive criticism: o)
nhibernate common.logging
user887732
source share