views:

24

answers:

1

Hi. I got some test console application with log4net and AdoNetAppender.

When I launch application I have log4net debug info in console(log4net:ERROR [AdoNetAppender] Could not open database connection) I initialize AdoNetAppender ConnectionString via code.

When I set <log4net debug="false"> it doesn't help.

I check log4net.Util.LogLog.InternalDebugging; log4net.Util.LogLog.QuietMode; properties after I read config file and configure log4net repository. They are both 'False'.

Why debug disabling doesn't work ?

A: 

Maybe you have it enabled with application settings in app.config:

<appSettings>
    <add key="log4net.Internal.Debug" value="true"/>
</appSettings>

This seems to ovverride the setting on the log4net node.

Stefan Egli
No App.Config contains only configSections and connectionStrings blocks
Brian J. Hakim