fix(api-gateway): add application version to the error logs
This commit is contained in:
parent
b39eb09d91
commit
daed1a77a0
1 changed files with 3 additions and 3 deletions
|
@ -92,11 +92,11 @@ void container.load().then((container) => {
|
|||
server.setErrorConfig((app) => {
|
||||
app.use((error: Record<string, unknown>, 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)}`,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue