mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-02 06:31:51 +02:00
Updated exceptrack driver's url, made test more effective.
This commit is contained in:
parent
aff17f7767
commit
6b3e102899
@ -57,7 +57,7 @@ public static void ReportParseError(string title)
|
||||
}
|
||||
}
|
||||
|
||||
public static void ReportException(LogEventInfo logEvent)
|
||||
public static string ReportException(LogEventInfo logEvent)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -69,7 +69,7 @@ public static void ReportException(LogEventInfo logEvent)
|
||||
exceptionData.Location = logEvent.LoggerName;
|
||||
exceptionData.UserId = EnvironmentProvider.UGuid.ToString().Replace("-", string.Empty);
|
||||
|
||||
ExceptrackDriver.SubmitException(exceptionData);
|
||||
return ExceptrackDriver.SubmitException(exceptionData);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@ -81,6 +81,8 @@ public static void ReportException(LogEventInfo logEvent)
|
||||
//this shouldn't log an exception since it will cause a recursive loop.
|
||||
logger.Info("Unable to report exception. " + e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -89,7 +91,9 @@ public static void SetupExceptrackDriver()
|
||||
ExceptrackDriver = new ExceptionClient(
|
||||
"CB230C312E5C4FF38B4FB9644B05E60D",
|
||||
new EnvironmentProvider().Version.ToString(),
|
||||
new Uri("http://api.exceptrack.com/"));
|
||||
new Uri("http://api.exceptrack.com/v1/"));
|
||||
|
||||
ExceptrackDriver.ThrowsExceptions = !EnvironmentProvider.IsProduction;
|
||||
}
|
||||
|
||||
private static void VerifyDependencies()
|
||||
|
@ -65,7 +65,9 @@ public void should_be_able_to_submit_exceptions()
|
||||
log.Exception = new ArgumentOutOfRangeException();
|
||||
log.Message = "New message string. New message string. New message string. New message string. New message string. New message string.";
|
||||
|
||||
ReportingService.ReportException(log);
|
||||
var hash = ReportingService.ReportException(log);
|
||||
|
||||
hash.Should().HaveLength(8);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user