From daed1a77a02559a8487896b6fb8299befe8a2d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Mon, 13 Nov 2023 11:23:18 +0100 Subject: [PATCH] fix(api-gateway): add application version to the error logs --- packages/api-gateway/bin/server.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/api-gateway/bin/server.ts b/packages/api-gateway/bin/server.ts index 96b181847..5532eee5d 100644 --- a/packages/api-gateway/bin/server.ts +++ b/packages/api-gateway/bin/server.ts @@ -92,11 +92,11 @@ void container.load().then((container) => { server.setErrorConfig((app) => { app.use((error: Record, request: Request, response: Response, _next: NextFunction) => { logger.error( - `[URL: |${request.method}| ${request.url}][SNJS: ${request.headers['x-snjs-version']}] Error thrown: ${error.stack}`, + `[URL: |${request.method}| ${request.url}][SNJS: ${request.headers['x-snjs-version']}][Application: ${request.headers['x-application-version']}] Error thrown: ${error.stack}`, ) logger.debug( - `[URL: |${request.method}| ${request.url}][SNJS: ${ - request.headers['x-snjs-version'] + `[URL: |${request.method}| ${request.url}][SNJS: ${request.headers['x-snjs-version']}][Application: ${ + request.headers['x-application-version'] }] Request body: ${JSON.stringify(request.body)}`, )