From 678c33d5fa0bb52562b6cf7517c2784d7d5ca9dc Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 3 Jul 2011 22:23:38 -0700 Subject: [PATCH] Logs view improvements --- NzbDrone.Core/Instrumentation/DatabaseTarget.cs | 5 +++++ NzbDrone.Web/Views/Log/Index.cshtml | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NzbDrone.Core/Instrumentation/DatabaseTarget.cs b/NzbDrone.Core/Instrumentation/DatabaseTarget.cs index eee8bbdf3..593c60929 100644 --- a/NzbDrone.Core/Instrumentation/DatabaseTarget.cs +++ b/NzbDrone.Core/Instrumentation/DatabaseTarget.cs @@ -33,6 +33,11 @@ namespace NzbDrone.Core.Instrumentation log.Logger = logEvent.LoggerName; + if (log.Logger.StartsWith("NzbDrone.")) + { + log.Logger = log.Logger.Remove(0, 9); + } + if (logEvent.Exception != null) { if (String.IsNullOrWhiteSpace(log.Message)) diff --git a/NzbDrone.Web/Views/Log/Index.cshtml b/NzbDrone.Web/Views/Log/Index.cshtml index 1ba7503b9..656d6cd87 100644 --- a/NzbDrone.Web/Views/Log/Index.cshtml +++ b/NzbDrone.Web/Views/Log/Index.cshtml @@ -31,12 +31,13 @@ Logs .TableHtmlAttributes(new { @class = "Grid" }) .Columns(columns => { - columns.Bound(c => c.Time).Title("Time").Width(190); + columns.Bound(c => c.Time).Title("Time").Width(0); columns.Bound(c => c.Level).Title("Level").Width(0); + columns.Bound(c => c.Logger).Title("Source").Width(0); columns.Bound(c => c.Message); }) .DetailView(detailView => detailView.ClientTemplate( - "
Logger: <#= Logger #>
" + + "
Method: <#= Method #>
" + "
<#= ExceptionType #>
" + "
<#= Exception #>
" )).DataBinding(data => data.Ajax().Select("_AjaxBinding", "Log"))