From 2df45af305dac484510e27c8d4a5e46c8c6b7ebd Mon Sep 17 00:00:00 2001 From: Mathis HERRIOT <197931332+0x485254@users.noreply.github.com> Date: Tue, 20 Jan 2026 10:01:40 +0100 Subject: [PATCH] style(logging): reformat hashed IP computation for improved readability --- backend/src/common/middlewares/http-logger.middleware.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/common/middlewares/http-logger.middleware.ts b/backend/src/common/middlewares/http-logger.middleware.ts index 42dda4b..f42538a 100644 --- a/backend/src/common/middlewares/http-logger.middleware.ts +++ b/backend/src/common/middlewares/http-logger.middleware.ts @@ -16,7 +16,9 @@ export class HTTPLoggerMiddleware implements NestMiddleware { const contentLength = response.get("content-length"); const duration = Date.now() - startTime; - const hashedIp = createHash("sha256").update(ip as string).digest("hex"); + const hashedIp = createHash("sha256") + .update(ip as string) + .digest("hex"); const message = `${method} ${originalUrl} ${statusCode} ${contentLength || 0} - ${userAgent} ${hashedIp} +${duration}ms`; if (statusCode >= 500) {