Index: LogManager.cs =================================================================== --- LogManager.cs (revision 409784) +++ LogManager.cs (working copy) @@ -2,7 +2,7 @@ #region Apache Notice /***************************************************************************** * $Header: $ - * $Revision: $ + * $Revision$ * $Date$ * * iBATIS.NET Data Mapper @@ -36,9 +36,8 @@ /// /// The LogManager can produce ILogFactory for various logging APIs, /// most notably for log4net. - /// Other implemenations such as - /// * SimpleLogger - /// * NoOpLogger are also supported. + /// Other implemenations such as ConsoleOutLogger, NoOpLogger, and TraceLogger + /// are also supported. /// public sealed class LogManager { @@ -56,9 +55,9 @@ { } /// - /// + /// Allows the logger factory to be set programmatically. /// - private static ILoggerFactoryAdapter Adapter + public static ILoggerFactoryAdapter Adapter { get { @@ -74,6 +73,14 @@ } return _adapter; } + + set + { + lock (_loadLock) + { + _adapter = value; + } + } } /// @@ -179,12 +186,7 @@ /// private static ILoggerFactoryAdapter BuildDefaultLoggerFactoryAdapter() { -#if dotnet2 - ILoggerFactoryAdapter simpleLogFactory = new ConsoleOutLoggerFA(new NameValueCollection(StringComparer.InvariantCultureIgnoreCase)); -#else - ILoggerFactoryAdapter simpleLogFactory = new ConsoleOutLoggerFA(new NameValueCollection( null, new CaseInsensitiveComparer() )); -#endif - return simpleLogFactory; + return new NoOpLoggerFA(); } } }