logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suedeuno <suede...@yahoo.com>
Subject error XmlConfigurator: Failed to parse config file.
Date Wed, 03 Dec 2008 18:42:06 GMT

I'm getting this error when running a unit test. It does complete the logging
in spite of this error. I need to resolve this so that the automated build
process does not fail. Any ideas?:

log4net : error XmlConfigurator: Failed to parse config file. Is the
<configSections> specified as: <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821" />


app.config:
    <configSections>
        <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
    </configSections>

In code:
            log4net.Config.XmlConfigurator.Configure();
            log =
LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
            log.Error("message);
-- 
View this message in context: http://www.nabble.com/error-XmlConfigurator%3A-Failed-to-parse-config-file.-tp20819038p20819038.html
Sent from the Log4net - Users mailing list archive at Nabble.com.


Mime
View raw message