From d10cdf9c87e631bcdaca9f2efbe0ba07f4a43aae Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Wed, 15 Oct 2014 19:23:10 -0700 Subject: [PATCH] removed method column from log db. --- .../InstrumentationTests/DatabaseTargetFixture.cs | 1 - .../Migration/064_add_remove_method_from_logs.cs | 14 ++++++++++++++ .../Instrumentation/DatabaseTarget.cs | 8 ++------ src/NzbDrone.Core/Instrumentation/Log.cs | 2 -- src/NzbDrone.Core/NzbDrone.Core.csproj | 1 + 5 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 src/NzbDrone.Core/Datastore/Migration/064_add_remove_method_from_logs.cs diff --git a/src/NzbDrone.Core.Test/InstrumentationTests/DatabaseTargetFixture.cs b/src/NzbDrone.Core.Test/InstrumentationTests/DatabaseTargetFixture.cs index c0cc34b57..ea4a63bae 100644 --- a/src/NzbDrone.Core.Test/InstrumentationTests/DatabaseTargetFixture.cs +++ b/src/NzbDrone.Core.Test/InstrumentationTests/DatabaseTargetFixture.cs @@ -133,7 +133,6 @@ private void VerifyLog(Log logItem, LogLevel level) logItem.Time.Should().BeWithin(TimeSpan.FromSeconds(2)); logItem.Logger.Should().Be(this.GetType().Name); logItem.Level.Should().Be(level.Name); - logItem.Method.Should().Be(new StackTrace().GetFrame(1).GetMethod().Name); _logger.Name.Should().EndWith(logItem.Logger); } } diff --git a/src/NzbDrone.Core/Datastore/Migration/064_add_remove_method_from_logs.cs b/src/NzbDrone.Core/Datastore/Migration/064_add_remove_method_from_logs.cs new file mode 100644 index 000000000..2fd04ea97 --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/064_add_remove_method_from_logs.cs @@ -0,0 +1,14 @@ +using FluentMigrator; +using NzbDrone.Core.Datastore.Migration.Framework; + +namespace NzbDrone.Core.Datastore.Migration +{ + [Migration(64)] + public class remove_method_from_logs : NzbDroneMigrationBase + { + protected override void LogDbUpgrade() + { + Delete.Column("Method").FromTable("Logs"); + } + } +} diff --git a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs index cc0fc0ccb..4c9ed9eda 100644 --- a/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs +++ b/src/NzbDrone.Core/Instrumentation/DatabaseTarget.cs @@ -18,8 +18,8 @@ public class DatabaseTarget : TargetWithLayout, IHandle +