Hi,
I have one question about the logging interface inside the library. I want to add more information such as tenantId, userId into the log messages so that it is easier for me to analyze them in CloudWatch insights. I know that I can pass in any information into the message if I use the logger instance inside the Controller. But for the error-based logs, I'm not sure how I can override the message with the extra contextual information I want. I'm using an error interceptor to handle all the errors, and once an error is thrown, it will be caught by the logger inside the library and the log message doesn't contain the prefix I want such as tenantId, userId. I was wondering if there is a way to inject more information into error-based logs? Or can I simply override the logger of the library with my own implementation?
Thanks for any help in advance.
Hi, I have one question about the logging interface inside the library. I want to add more information such as tenantId, userId into the log messages so that it is easier for me to analyze them in CloudWatch insights. I know that I can pass in any information into the message if I use the logger instance inside the Controller. But for the error-based logs, I'm not sure how I can override the message with the extra contextual information I want. I'm using an error interceptor to handle all the errors, and once an error is thrown, it will be caught by the logger inside the library and the log message doesn't contain the prefix I want such as tenantId, userId. I was wondering if there is a way to inject more information into error-based logs? Or can I simply override the logger of the library with my own implementation? Thanks for any help in advance.