Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cleanup: Simplify sentry logging macros #535

Merged
merged 1 commit into from
May 6, 2023
Merged

Conversation

bcaimano
Copy link
Contributor

This commit does the following:

  • Removes the message parameter from LOG_NOSENTRY, LOG_ERROR_ONCE, and LOG_ERROR_PERIODICALLY so that they can take a single string.
  • Removes LOG_ERROR_ONCE_IF and LOG_ERROR_PERIODICALLY_IF since they were sugar for if statements.
  • Removes the GCC CPP token paste operator from LOG_ERROR_ONCE and LOG_ERROR_PERIODICALLY. KJ_LOG already has it for us. (And if it didn't, we should be using __VA_OPT__(...).)

@bcaimano bcaimano requested a review from vlovich April 11, 2023 20:07
Copy link
Collaborator

@dom96 dom96 left a comment

Choose a reason for hiding this comment

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

Nice! LGTM

This commit does the following:
- Removes the `message` parameter from LOG_NOSENTRY, LOG_ERROR_ONCE, and LOG_ERROR_PERIODICALLY so that they can take a single string.
- Removes LOG_ERROR_ONCE_IF and LOG_ERROR_PERIODICALLY_IF since they were sugar for if statements.
- Removes the GCC CPP token paste operator from LOG_ERROR_ONCE and LOG_ERROR_PERIODICALLY. KJ_LOG already has it for us. (And if it didn't, we should be using `__VA_OPT__(...)`.)
@bcaimano bcaimano force-pushed the bcaimano/log-once branch from e4734c5 to eda70e8 Compare May 5, 2023 23:11
@bcaimano bcaimano merged commit 9c59dd2 into main May 6, 2023
@bcaimano bcaimano deleted the bcaimano/log-once branch May 6, 2023 00:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants