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

Fixed log level ordering to standard #293

Merged
merged 1 commit into from
Jun 6, 2023
Merged

Fixed log level ordering to standard #293

merged 1 commit into from
Jun 6, 2023

Conversation

matux
Copy link
Collaborator

@matux matux commented Jun 6, 2023

Description of the change

This PR fixes the ordering of log levels which was very wrong. This issue was reported today.

This incorrect ordering introduces issues when defining minimum level for logging since we use the integer ordering of the enum to check whether we should record a log or not.

This can be seen in the shouldSkipReporting: function in RollbarLogger: https://github.com/rollbar/rollbar-apple/blob/master/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m#L179

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Maintenance
  • New release

Related issues

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers assigned
  • Issue from task tracker has a link to this pull request
  • Changes have been reviewed by at least one other engineer

@matux matux self-assigned this Jun 6, 2023
@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #126937: Apple SDK: Fix ordering of logging levels.

@cyrusradfar cyrusradfar self-requested a review June 6, 2023 20:53
Copy link

@cyrusradfar cyrusradfar left a comment

Choose a reason for hiding this comment

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

Thanks for the quick turn. One nit. Although we appreciate the rename helps standardize to a convention, but in the future, consider breaking into two PRs so we can limit the risk of the quick fix.

@matux
Copy link
Collaborator Author

matux commented Jun 6, 2023

Thanks for the quick turn. One nit. Although we appreciate the rename helps standardize to a convention, but in the future, consider breaking into two PRs so we can limit the risk of the quick fix.

I understand, couldn't help the OCD, next time I'll do a proper separate PR!

Copy link

@ijsnow ijsnow left a comment

Choose a reason for hiding this comment

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

🦦

@matux matux force-pushed the log_level_order branch from 1bb812f to 63dba45 Compare June 6, 2023 22:13
@matux matux force-pushed the log_level_order branch from 63dba45 to ecb1133 Compare June 6, 2023 22:39
@matux matux merged commit ef7a934 into master Jun 6, 2023
@matux matux deleted the log_level_order branch June 6, 2023 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Priority of RollbarLevel.Info and RollbarLevel.Debug is inverted - version 3.0.0
3 participants