diff --git a/src/NzbDrone.Common/Instrumentation/LogTargets.cs b/src/NzbDrone.Common/Instrumentation/LogTargets.cs index 271b449c4..12f23ed69 100644 --- a/src/NzbDrone.Common/Instrumentation/LogTargets.cs +++ b/src/NzbDrone.Common/Instrumentation/LogTargets.cs @@ -27,7 +27,6 @@ namespace NzbDrone.Common.Instrumentation if (updateApp) { - RegisterLoggly(); RegisterUpdateFile(appFolderInfo); } else @@ -127,15 +126,6 @@ namespace NzbDrone.Common.Instrumentation LogManager.Configuration.AddTarget("ExceptronTarget", exceptronTarget); LogManager.Configuration.LoggingRules.Add(rule); } - - private static void RegisterLoggly() - { - var logglyTarger = new LogglyTarget(); - - var rule = new LoggingRule("*", LogLevel.Trace, logglyTarger); - - LogManager.Configuration.AddTarget("LogglyLogger", logglyTarger); - LogManager.Configuration.LoggingRules.Add(rule); - } + } } \ No newline at end of file diff --git a/src/NzbDrone.Common/Instrumentation/LogglyTarget.cs b/src/NzbDrone.Common/Instrumentation/LogglyTarget.cs deleted file mode 100644 index ba4f0b984..000000000 --- a/src/NzbDrone.Common/Instrumentation/LogglyTarget.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System.Collections.Generic; -using NLog; -using NLog.Layouts; -using NLog.Targets; -using NzbDrone.Common.EnvironmentInfo; -using NzbDrone.Common.Serializer; -using Logger = Loggly.Logger; - -namespace NzbDrone.Common.Instrumentation -{ - public class LogglyTarget : TargetWithLayout - { - private Logger _logger; - - public LogglyTarget() - { - Layout = new SimpleLayout("${callsite:className=false:fileName=false:includeSourcePath=false:methodName=true}"); - - } - - protected override void InitializeTarget() - { - string apiKey = string.Empty; - - if (RuntimeInfoBase.IsProduction) - { - apiKey = "4c4ecb69-d1b9-4e2a-b54b-b0c4cc143a95"; - } - else - { - apiKey = "d344a321-b107-45c4-a548-77138f446510"; - } - - _logger = new Logger(apiKey); - } - - - protected override void Write(LogEventInfo logEvent) - { - var dictionary = new Dictionary(); - - if (logEvent.Exception != null) - { - dictionary.Add("ex", logEvent.Exception.ToString()); - dictionary.Add("extyp", logEvent.Exception.GetType().Name); - dictionary.Add("hash", logEvent.GetHash()); - - foreach (var key in logEvent.Exception.Data.Keys) - { - dictionary.Add(key.ToString(), logEvent.Exception.Data[key]); - } - } - - dictionary.Add("logger", logEvent.LoggerName); - dictionary.Add("method", Layout.Render(logEvent)); - dictionary.Add("level", logEvent.Level.Name); - dictionary.Add("message", logEvent.GetFormattedMessage()); - dictionary.Add("ver", BuildInfo.Version.ToString()); - - _logger.Log(dictionary.ToJson()); - } - } -} \ No newline at end of file diff --git a/src/NzbDrone.Common/NzbDrone.Common.csproj b/src/NzbDrone.Common/NzbDrone.Common.csproj index 9d1bc3385..ba97e0ebd 100644 --- a/src/NzbDrone.Common/NzbDrone.Common.csproj +++ b/src/NzbDrone.Common/NzbDrone.Common.csproj @@ -52,9 +52,6 @@ ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - - ..\packages\loggly-csharp.2.3\lib\net35\Loggly.dll - ..\packages\NLog.2.1.0\lib\net40\NLog.dll @@ -133,7 +130,6 @@ - diff --git a/src/NzbDrone.Common/packages.config b/src/NzbDrone.Common/packages.config index 7a6513c11..0113db496 100644 --- a/src/NzbDrone.Common/packages.config +++ b/src/NzbDrone.Common/packages.config @@ -1,6 +1,5 @@  -