From a05e1914e387fbd86810d4103db61d2fb880d374 Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 2 Sep 2023 14:11:11 +0200 Subject: [PATCH] Log output changes --- Tranga/Jobs/Job.cs | 1 + Tranga/MangaConnectors/DownloadClient.cs | 2 +- Tranga/Server.cs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Tranga/Jobs/Job.cs b/Tranga/Jobs/Job.cs index a2ccbac..d0520d6 100644 --- a/Tranga/Jobs/Job.cs +++ b/Tranga/Jobs/Job.cs @@ -62,6 +62,7 @@ public abstract class Job : GlobalBase public void Cancel() { + Log($"Cancelling {this}"); this.progressToken.cancellationRequested = true; this.progressToken.Complete(); } diff --git a/Tranga/MangaConnectors/DownloadClient.cs b/Tranga/MangaConnectors/DownloadClient.cs index 2bd244c..efdc9ac 100644 --- a/Tranga/MangaConnectors/DownloadClient.cs +++ b/Tranga/MangaConnectors/DownloadClient.cs @@ -60,7 +60,7 @@ internal class DownloadClient : GlobalBase if(referrer is not null) requestMessage.Headers.Referrer = new Uri(referrer); _lastExecutedRateLimit[requestType] = DateTime.Now; - Log($"Requesting {requestType} {url}"); + //Log($"Requesting {requestType} {url}"); response = Client.Send(requestMessage); } catch (HttpRequestException e) diff --git a/Tranga/Server.cs b/Tranga/Server.cs index e6c999f..1a6f8ba 100644 --- a/Tranga/Server.cs +++ b/Tranga/Server.cs @@ -45,7 +45,7 @@ public class Server : GlobalBase try { HttpListenerContext context = this._listener.GetContext(); - Log($"{context.Request.HttpMethod} {context.Request.Url} {context.Request.UserAgent}"); + //Log($"{context.Request.HttpMethod} {context.Request.Url} {context.Request.UserAgent}"); Task t = new(() => { HandleRequest(context); @@ -441,7 +441,7 @@ public class Server : GlobalBase private void SendResponse(HttpStatusCode statusCode, HttpListenerResponse response, object? content = null) { - Log($"Response: {statusCode} {content}"); + //Log($"Response: {statusCode} {content}"); response.StatusCode = (int)statusCode; response.AddHeader("Access-Control-Allow-Headers", "Content-Type, Accept, X-Requested-With"); response.AddHeader("Access-Control-Allow-Methods", "GET, POST, DELETE");