fixing changes related to upgrades to Common.Logging 2.0
This commit is contained in:
@@ -7,10 +7,7 @@ namespace Spring.Aspects.Exceptions
|
||||
{
|
||||
public static readonly string NAME = "capturingLogger";
|
||||
public CaptureOutputLogger()
|
||||
: base(NAME, LogLevel.All, false, false, null)
|
||||
|
||||
// TODO: use this line when upgrading to Common.Logging 2.0:
|
||||
// : base(false, NAME, LogLevel.All, true, false, false, null)
|
||||
: base(false, NAME, LogLevel.All, true, false, false, null)
|
||||
{ }
|
||||
|
||||
// private LogLevel _currentLogLevel = LogLevel.All;
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
<section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/>
|
||||
</sectionGroup>
|
||||
|
||||
<sectionGroup name="common">
|
||||
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
|
||||
</sectionGroup>
|
||||
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
|
||||
|
||||
</configSections>
|
||||
|
||||
@@ -17,10 +15,10 @@
|
||||
<add key="key" value="from custom config!"/>
|
||||
</appSettings>
|
||||
|
||||
<common>
|
||||
<logging>
|
||||
<factoryAdapter type="Common.Logging.Simple.TraceLoggerFactoryAdapter, Common.Logging"/>
|
||||
</logging>
|
||||
</common>
|
||||
|
||||
<logging>
|
||||
<factoryAdapter type="Common.Logging.Simple.TraceLoggerFactoryAdapter, Common.Logging"/>
|
||||
</logging>
|
||||
|
||||
|
||||
</configuration>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
using System.Configuration;
|
||||
using System.Configuration.Internal;
|
||||
using System.IO;
|
||||
using Common.Logging;
|
||||
using Common.Logging.Configuration;
|
||||
using Common.Logging.Simple;
|
||||
using NUnit.Framework;
|
||||
using Spring.Util;
|
||||
@@ -44,7 +44,7 @@ namespace Spring.EnterpriseServices
|
||||
{
|
||||
ExeConfigurationSystem ccs = new ExeConfigurationSystem(exePath);
|
||||
prevConfig = ConfigurationUtils.SetConfigurationSystem(ccs, true);
|
||||
LogSetting settings = (LogSetting) ConfigurationManager.GetSection("common/logging");
|
||||
LogSetting settings = (LogSetting) ConfigurationManager.GetSection("logging");
|
||||
Assert.AreEqual(typeof (TraceLoggerFactoryAdapter), settings.FactoryAdapterType);
|
||||
|
||||
Assert.AreEqual("from custom config!", ConfigurationManager.AppSettings["key"]);
|
||||
|
||||
Reference in New Issue
Block a user