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

chore: lower log-level for unexpected errors #3837

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

thomasheartman
Copy link
Contributor

This change lowers the log level from warning to debug for when we see unexpected error types.

Right now this triggers for Joi errors, which we still rely on pretty heavily. Lowering this should clear up logs for most users.

This change lowers the log level from warning to debug for when we see
unexpected error types.

Right now this triggers for Joi errors, which we still rely on pretty
heavily. Lowering this should clear up logs for most users.
It's not just unexpected crashes anymore
@vercel
Copy link

vercel bot commented May 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) May 23, 2023 7:26am
unleash-monorepo-frontend ⬜️ Ignored (Inspect) May 23, 2023 7:26am

@sjaanus
Copy link
Contributor

sjaanus commented May 23, 2023

I wonder if we might miss some important errors, because this seems global.

@thomasheartman
Copy link
Contributor Author

Good question. So this is global, but there's a few things to consider:

  1. This only tells us if the error wasn't spawned by one of our custom error types. With the exception of Joi validation errors and unexpected server errors (type errors, null errors, etc), they all should be. This was primarily put in place to discover cases like Joi.
  2. On line 40 of the same file, we log the error's message with a warn-level regardless. So the error won't disappear from the logs. You'll just not get the big "it was something we didn't expect" message.

Does that make sense?

@thomasheartman
Copy link
Contributor Author

@sjaanus Just wanted to remind you of this one now that we're back from Poland. Any more thoughts on this?

Copy link
Contributor

@sjaanus sjaanus left a comment

Choose a reason for hiding this comment

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

LG

@thomasheartman thomasheartman merged commit 08834a7 into main Jun 7, 2023
10 checks passed
@thomasheartman thomasheartman deleted the chore/lower-log-level branch June 7, 2023 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants