limit the amount that can be logged to console and file
This commit is contained in:
@@ -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)}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user