limit the amount that can be logged to console and file

This commit is contained in:
CWX
2025-04-11 18:06:37 +01:00
parent 6fdabc8fd7
commit 026c4f0271
@@ -159,7 +159,7 @@ public class SptHttpListener : IHttpListener
SendJson(resp, output, sessionID);
if (_logger.IsLogEnabled(LogLevel.Debug))
{
_logger.Debug($"Response: {output}");
_logger.Debug($"Response: {output.Substring(0, Math.Min(output.Length, 4000))}");
}
LogRequest(req, output);
@@ -200,7 +200,7 @@ public class SptHttpListener : IHttpListener
{
if (ProgramStatics.ENTRY_TYPE() != EntryType.RELEASE)
{
var log = new Response(req.Method, output);
var log = new Response(req.Method, output.Substring(0, Math.Min(output.Length, 2000)));
_requestLogger.Info($"RESPONSE={_jsonUtil.Serialize(log)}");
}
}