aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations/Logging/NlogManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Common.Implementations/Logging/NlogManager.cs')
-rw-r--r--MediaBrowser.Common.Implementations/Logging/NlogManager.cs18
1 files changed, 7 insertions, 11 deletions
diff --git a/MediaBrowser.Common.Implementations/Logging/NlogManager.cs b/MediaBrowser.Common.Implementations/Logging/NlogManager.cs
index 109e85d80..e20f9bc13 100644
--- a/MediaBrowser.Common.Implementations/Logging/NlogManager.cs
+++ b/MediaBrowser.Common.Implementations/Logging/NlogManager.cs
@@ -5,7 +5,6 @@ using NLog.Targets;
using System;
using System.IO;
using System.Linq;
-using System.Threading.Tasks;
namespace MediaBrowser.Common.Implementations.Logging
{
@@ -193,17 +192,14 @@ namespace MediaBrowser.Common.Implementations.Logging
if (LoggerLoaded != null)
{
- Task.Run(() =>
+ try
{
- try
- {
- LoggerLoaded(this, EventArgs.Empty);
- }
- catch (Exception ex)
- {
- GetLogger("Logger").ErrorException("Error in LoggerLoaded event", ex);
- }
- });
+ LoggerLoaded(this, EventArgs.Empty);
+ }
+ catch (Exception ex)
+ {
+ GetLogger("Logger").ErrorException("Error in LoggerLoaded event", ex);
+ }
}
}
}