From f20da06d438582b687b7d46b795c61750d926bf2 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Wed, 4 Nov 2020 12:54:02 +0100 Subject: [PATCH] logging: also log ip address --- src/components/LogRequestsComponent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LogRequestsComponent.ts b/src/components/LogRequestsComponent.ts index 0faa130..0e70ae3 100644 --- a/src/components/LogRequestsComponent.ts +++ b/src/components/LogRequestsComponent.ts @@ -46,7 +46,7 @@ export default class LogRequestsComponent extends ApplicationComponent { req.log.info(requestObj); } } else { - let logStr = `${req.method} ${req.originalUrl} - ${res.statusCode}`; + let logStr = `${req.ip} < ${req.method} ${req.originalUrl} - ${res.statusCode}`; if (err) { if (err instanceof Error) { if (silent) {