-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce stackspam #237
Reduce stackspam #237
Conversation
This should cut a lot on the noise in logs.
if (!LogService.level.includes(LogLevel.TRACE)) { | ||
// Remove stack trace to reduce impact on logs. | ||
error.stack = ""; | ||
} | ||
return cb(error, response, resBody); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who calls LogService.error
after this though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, is there a reason why they do this https://github.com/turt2live/matrix-bot-sdk/blob/e7a77fd126801694b723b79f16fb6031e16b4d1b/src/http.ts#L30 instead of including that information in the error object? Could we add that in our wrapper? Then we would just be able to silence MatrixHttpClient
completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd also mean we don't have to run logs in debug to be able to track down errors in production
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to. I haven't been able to get any review on my PRs for matrix-bot-sdk, but perhaps if we ping hard enough in the relevant room, we could do that, too :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We wouldn't have to modify matrix-bot-sdk to do any of this though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think we need to do this and did not explicitly approve the PR for this reason, but ok.
This should cut a lot on the noise in logs.
This should cut a lot on the noise in logs.