From 9ff4b5a259e3583d15aeca1dce4c9ddcbb752023 Mon Sep 17 00:00:00 2001 From: Justin Wind Date: Wed, 27 Apr 2022 15:16:50 -0700 Subject: [PATCH] log raw handler objects, rather than deprecated wrapper --- lib/dingus.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dingus.js b/lib/dingus.js index 51da6fa..4eded66 100644 --- a/lib/dingus.js +++ b/lib/dingus.js @@ -521,7 +521,7 @@ class Dingus { */ async serveFile(req, res, ctx, directory, fileName) { const _scope = _fileScope('serveFile'); - this.logger.debug(_scope, 'called', { req: common.requestLogData(req), ctx }); + this.logger.debug(_scope, 'called', { req, ctx }); // Require a directory field. if (!directory) { @@ -649,11 +649,11 @@ class Dingus { if (err && err.statusCode) { res.statusCode = err.statusCode; body = this.renderError(res.getHeader(Enum.Header.ContentType), err); - this.logger.debug(_scope, 'handler error', { err, ...common.handlerLogData(req, res, ctx) }); + this.logger.debug(_scope, 'handler error', { err, req, res, ctx }); } else { res.statusCode = 500; body = this.renderError(res.getHeader(Enum.Header.ContentType), Enum.ErrorResponse.InternalServerError); - this.logger.error(_scope, 'handler exception', { err, ...common.handlerLogData(req, res, ctx) }); + this.logger.error(_scope, 'handler exception', { err, req, res, ctx }); } res.end(body); } -- 2.43.2