I have the following Fluent Nhibernate configuration:
public ISessionSource CreateSessionSource()
{
var config = Fluently.Configure()
.Database(MsSqlCeConfiguration
.Standard
.ConnectionString(connectionString)
.DoNot.ShowSql()
.UseOuterJoin()
.UseReflectionOptimizer())
.Mappings(GetMappings)
.Diagnostics(x => x.Enable(false))
.ExposeConfiguration(ExposeConfiguration);
Factory.RegisterSingleton(config);
var source = new SessionSource(config);
return source;
}
I had understood that the .Diagnostics(x => x.Enable(false)) would prevent logging but I am still getting the entire DEBUG,INFO,ERROR,FATAL levels logged to my log4net appenders.
Any pointers or help would be appreciated.
Thanks
As I understand it, the Diagnostics method controls Fluent NHibernate’s logging level, not NHibernate’s. The log4net logging level for NHibernate should be set in your config file: