mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fix intermitent bug with injecting ILogger
--HG-- branch : dev
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user