Log output changes
This commit is contained in:
parent
ed79ee5d0f
commit
a05e1914e3
@ -62,6 +62,7 @@ public abstract class Job : GlobalBase
|
||||
|
||||
public void Cancel()
|
||||
{
|
||||
Log($"Cancelling {this}");
|
||||
this.progressToken.cancellationRequested = true;
|
||||
this.progressToken.Complete();
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user