Skip to content
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

Merged
merged 1 commit into from
Feb 25, 2022
Merged

Reduce stackspam #237

merged 1 commit into from
Feb 25, 2022

Conversation

Yoric
Copy link
Contributor

@Yoric Yoric commented Feb 25, 2022

This should cut a lot on the noise in logs.

This should cut a lot on the noise in logs.
@Yoric Yoric requested a review from Gnuxie February 25, 2022 14:11
if (!LogService.level.includes(LogLevel.TRACE)) {
// Remove stack trace to reduce impact on logs.
error.stack = "";
}
return cb(error, response, resBody);
Copy link
Contributor

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?

Copy link
Contributor Author

@Yoric Yoric Feb 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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.

Copy link
Contributor

@Gnuxie Gnuxie Feb 25, 2022

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

Copy link
Contributor Author

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 :)

Copy link
Contributor

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.

Copy link
Contributor

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.

@Yoric Yoric merged commit eb7f5f6 into main Feb 25, 2022
@Yoric Yoric deleted the yoric/no-stacks branch February 25, 2022 16:59
Yoric pushed a commit that referenced this pull request Feb 25, 2022
This should cut a lot on the noise in logs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants