Fix intermitent bug with injecting ILogger

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-12-03 16:42:13 -08:00
parent ee31489a17
commit c4fb128c72
2 changed files with 4 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ namespace Orchard.Logging {
Fatal Fatal
} }
public interface ILogger : ISingletonDependency { public interface ILogger {
bool IsEnabled(LogLevel level); bool IsEnabled(LogLevel level);
void Log(LogLevel level, Exception exception, string format, params object[] args); void Log(LogLevel level, Exception exception, string format, params object[] args);
} }

View File

@@ -1,4 +1,5 @@
using System; using System;
using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
@@ -14,7 +15,7 @@ namespace Orchard.Logging {
private readonly IDictionary<string, ILogger> _loggerCache; private readonly IDictionary<string, ILogger> _loggerCache;
public LoggingModule() { public LoggingModule() {
_loggerCache = new Dictionary<string, ILogger>(); _loggerCache = new ConcurrentDictionary<string, ILogger>();
} }
protected override void Load(ContainerBuilder moduleBuilder) { protected override void Load(ContainerBuilder moduleBuilder) {