mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
ReSharper code cleanup
This commit is contained in:
parent
8cade435d1
commit
e896af5cd0
138 changed files with 2368 additions and 2218 deletions
|
@ -11,17 +11,18 @@ namespace NzbDrone.Core.Instrumentation
|
|||
protected override void Write(LogEventInfo logEvent)
|
||||
{
|
||||
if (logEvent.Exception == null)
|
||||
throw new InvalidOperationException(@"Missing Exception Object.. Please Use Logger.FatalException() or Logger.ErrorException() rather
|
||||
throw new InvalidOperationException(
|
||||
@"Missing Exception Object.. Please Use Logger.FatalException() or Logger.ErrorException() rather
|
||||
than Logger.Fatal() and Logger.Error()");
|
||||
|
||||
if (!Debugger.IsAttached)
|
||||
{
|
||||
new Client
|
||||
{
|
||||
ApiKey = "43BBF60A-EB2A-4C1C-B09E-422ADF637265",
|
||||
ApplicationName = "NZBDrone",
|
||||
CurrentException = logEvent.Exception
|
||||
}.Submit();
|
||||
{
|
||||
ApiKey = "43BBF60A-EB2A-4C1C-B09E-422ADF637265",
|
||||
ApplicationName = "NZBDrone",
|
||||
CurrentException = logEvent.Exception
|
||||
}.Submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,4 +38,4 @@ namespace NzbDrone.Core.Instrumentation
|
|||
get { return Level.ToString(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using Ninject;
|
||||
using NLog;
|
||||
using NLog.Config;
|
||||
using Ninject;
|
||||
|
||||
namespace NzbDrone.Core.Instrumentation
|
||||
{
|
||||
|
@ -15,7 +15,8 @@ namespace NzbDrone.Core.Instrumentation
|
|||
LogManager.ThrowExceptions = true;
|
||||
}
|
||||
|
||||
LogManager.Configuration = new XmlLoggingConfiguration(Path.Combine(CentralDispatch.AppPath, "log.config"), false);
|
||||
LogManager.Configuration = new XmlLoggingConfiguration(Path.Combine(CentralDispatch.AppPath, "log.config"),
|
||||
false);
|
||||
LogManager.ConfigurationReloaded += ((s, e) => BindCustomLoggers());
|
||||
BindCustomLoggers();
|
||||
}
|
||||
|
@ -35,9 +36,5 @@ namespace NzbDrone.Core.Instrumentation
|
|||
|
||||
LogManager.Configuration.Reload();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,13 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using SubSonic.Repository;
|
||||
|
||||
namespace NzbDrone.Core.Instrumentation
|
||||
{
|
||||
|
||||
public class LogProvider
|
||||
{
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
@ -29,4 +25,4 @@ namespace NzbDrone.Core.Instrumentation
|
|||
Logger.Info("Cleared Log History");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,6 +8,11 @@ namespace NzbDrone.Core.Instrumentation
|
|||
{
|
||||
private static readonly Logger Logger = LogManager.GetLogger("NzbDrone.SubSonic");
|
||||
|
||||
public override Encoding Encoding
|
||||
{
|
||||
get { return Encoding.Default; }
|
||||
}
|
||||
|
||||
|
||||
public override void Write(char[] buffer, int index, int count)
|
||||
{
|
||||
|
@ -23,10 +28,5 @@ namespace NzbDrone.Core.Instrumentation
|
|||
{
|
||||
Logger.Trace(value);
|
||||
}
|
||||
|
||||
public override Encoding Encoding
|
||||
{
|
||||
get { return Encoding.Default; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,11 +1,7 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using Exceptioneer.WindowsFormsClient;
|
||||
using NLog;
|
||||
using NLog.Targets;
|
||||
using SubSonic.Repository;
|
||||
using Ninject;
|
||||
using NzbDrone.Core.Repository;
|
||||
|
||||
namespace NzbDrone.Core.Instrumentation
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue