While logging, include or render the additional parameters (meta data or splat data).
Currently, we are not able to render them in the logs.
For example,
app.listen(ServerConfig.PORT, () => { console.log('Successfully started the server on PORT : ${ServerConfig.PORT}'); Logger.error('Checking error logging', {msg: 'Something went wrong'}) });
Currently, we are not able to render the additional parameters (msg: 'Something went wrong') to the logs.
We are getting the log output as following:
As we can see, only the message is rendered and not the meta data.
We need to implement the functionality such that we are able to include these meta data in the logs file.
While logging, include or render the additional parameters (meta data or splat data). Currently, we are not able to render them in the logs. For example,
app.listen(ServerConfig.PORT, () => { console.log('Successfully started the server on PORT : ${ServerConfig.PORT}'); Logger.error('Checking error logging', {msg: 'Something went wrong'}) });
Currently, we are not able to render the additional parameters (msg: 'Something went wrong') to the logs. We are getting the log output as following:
As we can see, only the message is rendered and not the meta data.
We need to implement the functionality such that we are able to include these meta data in the logs file.