mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Fix AnimeBytes caps, Change to 4.5 #117, change all trackers to retry failed requests
This commit is contained in:
22
src/Jackett/WebAPIExceptionLogger.cs
Normal file
22
src/Jackett/WebAPIExceptionLogger.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http.ExceptionHandling;
|
||||
using Jackett.Utils;
|
||||
|
||||
namespace Jackett
|
||||
{
|
||||
class WebAPIExceptionLogger : IExceptionLogger
|
||||
{
|
||||
public async Task LogAsync(ExceptionLoggerContext context, CancellationToken cancellationToken)
|
||||
{
|
||||
Engine.Logger.Error("Unhandled exception: " + context.Exception.GetExceptionDetails());
|
||||
var request = await context.Request.Content.ReadAsStringAsync();
|
||||
Engine.Logger.Error("Unhandled exception url: " + context.Request.RequestUri);
|
||||
Engine.Logger.Error("Unhandled exception request body: " + request);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user