fixing changes related to upgrades to Common.Logging 2.0

This commit is contained in:
Steve Bohlen
2012-05-10 18:16:27 -04:00
parent 1a5fd1936b
commit bf082bc3aa
5 changed files with 2476 additions and 2476 deletions

View File

@@ -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;

View File

@@ -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>

View File

@@ -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"]);