From c4750d729a89e90e4638803aa3c4921541a2f6ce Mon Sep 17 00:00:00 2001 From: MATRIX-feather Date: Mon, 22 Jul 2024 20:13:20 +0800 Subject: [PATCH] Remove debug output --- .../Feature/Gosumemory/Web/GosuSession.cs | 16 +++++++++++----- .../Feature/Gosumemory/Web/WebSocketLoader.cs | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/osu.Game.Rulesets.IGPlayer/Feature/Gosumemory/Web/GosuSession.cs b/osu.Game.Rulesets.IGPlayer/Feature/Gosumemory/Web/GosuSession.cs index 6a55f1a..9a96232 100644 --- a/osu.Game.Rulesets.IGPlayer/Feature/Gosumemory/Web/GosuSession.cs +++ b/osu.Game.Rulesets.IGPlayer/Feature/Gosumemory/Web/GosuSession.cs @@ -27,7 +27,7 @@ protected override void OnReceivedRequest(HttpRequest request) if (!path.EndsWith("/ws", StringComparison.Ordinal) && !path.EndsWith("/json", StringComparison.Ordinal)) { - Logging.Log("Received FILE? request " + request.Url); + //Logging.Log("Received FILE? request " + request.Url); HttpResponse response = new HttpResponse(); response.SetBegin(200); @@ -70,7 +70,7 @@ protected override void OnReceivedRequest(HttpRequest request) // 目标存储的绝对位置 string targetFilePath = storage.GetFullPath(storagePath); - Logging.Log("URLPath is " + urlPath); + //Logging.Log("URLPath is " + urlPath); // 处理Songs if (urlPath.StartsWith("Songs", StringComparison.Ordinal)) @@ -94,6 +94,8 @@ protected override void OnReceivedRequest(HttpRequest request) if (content.Length == 0) { response.SetBegin(404); + //Logging.Log("404 File Length is " + response.BodyLength); + this.SendResponse(response); return; @@ -104,6 +106,8 @@ protected override void OnReceivedRequest(HttpRequest request) .SetHeader("Access-Control-Allow-Origin", "*"); response.SetBody(content); + //Logging.Log("File Length is " + response.BodyLength); + this.SendResponse(response); return; } @@ -126,6 +130,8 @@ protected override void OnReceivedRequest(HttpRequest request) .SetHeader("Access-Control-Allow-Origin", "*"); response.SetBody(File.ReadAllBytes(targetFilePath)); + //Logging.Log("File Length is " + response.BodyLength); + this.SendResponse(response); return; } @@ -163,11 +169,11 @@ protected override void OnReceivedRequest(HttpRequest request) response.SetBody(htmlCode); this.SendResponse(response); - Logging.Log("Sending " + response.Body); + //Logging.Log("Sending " + response.Body); } else { - Logging.Log("Received WS OR JSON request " + request.Url); + //Logging.Log("Received WS OR JSON request " + request.Url); base.OnReceivedRequest(request); } @@ -175,7 +181,7 @@ protected override void OnReceivedRequest(HttpRequest request) public override void OnWsConnected(HttpRequest request) { - Logging.Log($"Chat WebSocket session with Id {Id} connected!"); + Logging.Log($"WebSocket session with Id {Id} connected!"); } public override void OnWsDisconnected() diff --git a/osu.Game.Rulesets.IGPlayer/Feature/Gosumemory/Web/WebSocketLoader.cs b/osu.Game.Rulesets.IGPlayer/Feature/Gosumemory/Web/WebSocketLoader.cs index d28ffec..de13407 100644 --- a/osu.Game.Rulesets.IGPlayer/Feature/Gosumemory/Web/WebSocketLoader.cs +++ b/osu.Game.Rulesets.IGPlayer/Feature/Gosumemory/Web/WebSocketLoader.cs @@ -162,7 +162,7 @@ public void SetStorage(Storage statics, Storage caches) protected override void OnError(SocketError error) { - Logging.Log($"Chat WebSocket server caught an error with code {error}"); + Logging.Log($"WebSocket server caught an error with code {error}"); } public void AddCustomHandler(string path, string urlPath, FileCache.InsertHandler handler)