aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/Logging/LogWindow.xaml.cs
diff options
context:
space:
mode:
authorLukePulverenti <luke.pulverenti@gmail.com>2013-03-05 13:11:25 -0500
committerLukePulverenti <luke.pulverenti@gmail.com>2013-03-05 13:11:25 -0500
commit1d155fefe765116072bb0de3025130c37762993c (patch)
tree8c4410943cc65d565290eabd5a387fefa2198a5f /MediaBrowser.ServerApplication/Logging/LogWindow.xaml.cs
parentffa702295a1549f8f066cefd7bc35d2bdafde8e8 (diff)
fixed duplicate logs
Diffstat (limited to 'MediaBrowser.ServerApplication/Logging/LogWindow.xaml.cs')
-rw-r--r--MediaBrowser.ServerApplication/Logging/LogWindow.xaml.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/MediaBrowser.ServerApplication/Logging/LogWindow.xaml.cs b/MediaBrowser.ServerApplication/Logging/LogWindow.xaml.cs
index 226cd8e87..31739577f 100644
--- a/MediaBrowser.ServerApplication/Logging/LogWindow.xaml.cs
+++ b/MediaBrowser.ServerApplication/Logging/LogWindow.xaml.cs
@@ -42,13 +42,14 @@ namespace MediaBrowser.ServerApplication.Logging
/// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
void LogWindow_Loaded(object sender, RoutedEventArgs e)
{
- var target = new TraceTarget
+ ((NlogManager)_logManager).RemoveTarget("LogWindowTraceTarget");
+
+ ((NlogManager)_logManager).AddLogTarget(new TraceTarget
{
- Layout = "${longdate}, ${level}, ${logger}, ${message}"
- };
+ Layout = "${longdate}, ${level}, ${logger}, ${message}",
+ Name = "LogWindowTraceTarget"
- ((NlogManager)_logManager).RemoveTarget("LogWindowTraceTarget");
- AddLogTarget(target, "LogWindowTraceTarget");
+ }, LogSeverity.Debug);
}
/// <summary>