Fix request logger throwing errors when logging non-json data

This commit is contained in:
Dev 2023-08-09 12:16:41 +01:00
parent dea27097b3
commit 7a1301d436

View File

@ -123,16 +123,7 @@ export class AkiHttpListener implements IHttpListener
if (globalThis.G_LOG_REQUESTS)
{
let data: any;
try
{
data = this.jsonUtil.deserialize(output);
}
catch (e)
{
data = output;
}
const log = new Response(req.method, data);
const log = new Response(req.method, output);
this.requestsLogger.info(`RESPONSE=${this.jsonUtil.serialize(log)}`);
}
}