Mattias
Mattias

Reputation: 704

NHibernate logging question

After doing some analyzing of our web site, we discovered that NHibernate logs an awful lot. Logging is set to WARN and should not log. Does NHibernate still prints debug messages even if logging level is not met?

See included picture:

enter image description here

Upvotes: 2

Views: 331

Answers (2)

marto
marto

Reputation: 4180

Add the following to you log4net config just for NHibernate

<logger name="NHibernate">
    <level value="ERROR"/>
</logger>

Upvotes: 2

Tomasz Jaskuλa
Tomasz Jaskuλa

Reputation: 16033

Maybe you have definied a logging configuration for a given namespace ? We can redefine the log level with this simple addition to our configuration

    <logger name="MyApp.Project.SomeNamespace.Foo">
<level value="WARN" />
</logger>

Alternatively, we can set the log level for the entire namespace or even the entire project with this configuration.

<logger name="MyApp.Project">
<level value="WARN" />
</logger>

Could you provide your log4net configuration ?

Upvotes: 0

Related Questions