--- LogManager.cs 2005-06-07 10:23:42.958942300 -0600 +++ LogManager.cs.orig 2005-06-06 12:25:33.099241900 -0600 @@ -1,7 +1,6 @@ #region Copyright & License // // Copyright 2001-2005 The Apache Software Foundation -// Copyright (C) 2005 Hewlett-Packard Development Company, L.P. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -55,59 +54,8 @@ /// /// Nicko Cadell /// Gert Driesen - /// Patrick Conant public sealed class LogManager { - #region Static Constructor - - /// - /// Static constructor used to initialize the log4net environment. - /// - /// - /// The static constructor looks for the "log4net.configuration" key value in the - /// application configuration settings (this can be set in the machine.config file - /// or the application's .config file). If the attribute is set to a valid URI, the - /// LogManager will configure logging from the config file indicated by the key value. - /// - static LogManager() - { - string defaultInitOverride = System.Configuration.ConfigurationSettings.AppSettings.Get(DEFAULT_INIT_OVERRIDE_KEY); - if (defaultInitOverride == null || "false".Equals(defaultInitOverride.ToLower())) - { - string configurationOptionStr = System.Configuration.ConfigurationSettings.AppSettings.Get(DEFAULT_CONFIGURATION_KEY); - Uri uri = null; - - try - { - uri = new Uri(configurationOptionStr); - } - catch(UriFormatException ex) - { - // The Uri appears invalid, so don't use it. - if (log4net.Util.LogLog.IsDebugEnabled) - log4net.Util.LogLog.Debug("Invalid value for " + DEFAULT_CONFIGURATION_KEY + " configuration key. \'" + configurationOptionStr + "\' is not a valid URI. " + ex.Message); - - uri = null; - } - - // If we have a non-null url, then delegate the rest of the - // configuration to the OptionConverter.selectAndConfigure - // method. - if(uri != null) - { - if (log4net.Util.LogLog.IsDebugEnabled) - log4net.Util.LogLog.Debug("Using URI [" + uri + "] for automatic log4net configuration."); - log4net.Config.XmlConfigurator.Configure(uri); - } - else - { - log4net.Util.LogLog.Debug("Could not find resource: [" + configurationOptionStr + "]."); - } - } - } - - #endregion - #region Private Instance Constructors /// @@ -836,16 +784,6 @@ /// private static readonly WrapperMap s_wrapperMap = new WrapperMap(new WrapperCreationHandler(WrapperCreationHandler)); - /// - /// Private key used internally to discover logging configuration. - /// - private static readonly string DEFAULT_CONFIGURATION_KEY = "log4net.configuration"; - - /// - /// Private key used internally, allows over-ride of default logging configuration. - /// - private static readonly string DEFAULT_INIT_OVERRIDE_KEY = "log4net.defaultInitOverride"; - #endregion Private Static Fields } }