Updated to exceptron api v1a

This commit is contained in:
kay.one
2012-04-29 18:24:24 -07:00
parent bb9e4c88ce
commit 16eecb3b4f
46 changed files with 52399 additions and 32 deletions
+3 -5
View File
@@ -36,13 +36,11 @@
<Reference Include="Exceptioneer.WindowsFormsClient">
<HintPath>..\Libraries\Exceptioneer.WindowsFormsClient.dll</HintPath>
</Reference>
<Reference Include="Exceptrack.Driver, Version=0.1.0.96, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Exceptrack.Driver.0.1.0.3\lib\net20\Exceptrack.Driver.dll</HintPath>
<Reference Include="Exceptron.Driver">
<HintPath>..\packages\Exceptron.Driver.0.1.0.3\lib\net20\Exceptron.Driver.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.4.5.3\lib\net40\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.4.5.4\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Ninject">
<HintPath>..\packages\Ninject.2.2.1.4\lib\net40-Full\Ninject.dll</HintPath>
+14 -14
View File
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Exceptrack.Driver;
using Exceptron.Driver;
using NLog;
using NzbDrone.Common.Contract;
@@ -13,10 +13,9 @@ namespace NzbDrone.Common
private const string SERVICE_URL = "http://services.nzbdrone.com/reporting";
private const string PARSE_URL = SERVICE_URL + "/ParseError";
private const string EXCEPTION_URL = SERVICE_URL + "/ReportException";
public static RestProvider RestProvider { get; set; }
public static ExceptionClient ExceptrackDriver { get; set; }
public static ExceptionClient ExceptronDriver { get; set; }
private static readonly HashSet<string> parserErrorCache = new HashSet<string>();
@@ -70,7 +69,7 @@ namespace NzbDrone.Common
exceptionData.Message = logEvent.FormattedMessage;
exceptionData.UserId = EnvironmentProvider.UGuid.ToString().Replace("-", string.Empty);
return ExceptrackDriver.SubmitException(exceptionData);
return ExceptronDriver.SubmitException(exceptionData);
}
catch (Exception e)
{
@@ -87,14 +86,15 @@ namespace NzbDrone.Common
}
public static void SetupExceptrackDriver()
public static void SetupExceptronDriver()
{
ExceptrackDriver = new ExceptionClient(
"CB230C312E5C4FF38B4FB9644B05E60D",
new EnvironmentProvider().Version.ToString(),
new Uri("http://api.exceptrack.com/v1/"));
ExceptronDriver = new ExceptionClient(
"CB230C312E5C4FF38B4FB9644B05E60E",
new EnvironmentProvider().Version.ToString(),
new Uri("http://api.Exceptron.com/v1aa/"));
ExceptrackDriver.ThrowsExceptions = !EnvironmentProvider.IsProduction;
ExceptronDriver.ThrowsExceptions = !EnvironmentProvider.IsProduction;
ExceptronDriver.Enviroment = EnvironmentProvider.IsProduction ? "Prod" : "Dev";
}
private static void VerifyDependencies()
@@ -112,16 +112,16 @@ namespace NzbDrone.Common
}
}
if (ExceptrackDriver == null)
if (ExceptronDriver == null)
{
if (EnvironmentProvider.IsProduction)
{
logger.Warn("Exceptrack Driver wasn't provided. creating new one!");
SetupExceptrackDriver();
logger.Warn("Exceptron Driver wasn't provided. creating new one!");
SetupExceptronDriver();
}
else
{
throw new InvalidOperationException("Exceptrack Driver wasn't configured correctly.");
throw new InvalidOperationException("Exceptron Driver wasn't configured correctly.");
}
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Exceptrack.Driver" version="0.1.0.3" />
<package id="Newtonsoft.Json" version="4.5.3" />
<package id="Exceptron.Driver" version="0.1.0.3" />
<package id="Newtonsoft.Json" version="4.5.4" />
<package id="NLog" version="2.0.0.2000" />
</packages>