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

logger: pass level to logHandlers when logging #1787

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Conversation

AndyTWF
Copy link
Contributor

@AndyTWF AndyTWF commented Jun 11, 2024

This allows handlers to make choices depending on the level of the log being raised (e.g. sending the logs to crashlytics when a certain number of error-level logs occur).

Other ecosystems that do already have this have the level before the message, however in this case we'll put the level second in order to ensure backwards compatibility.

@github-actions github-actions bot temporarily deployed to staging/pull/1787/features June 11, 2024 15:44 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1787/bundle-report June 11, 2024 15:44 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1787/features June 11, 2024 15:47 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1787/bundle-report June 11, 2024 15:47 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1787/typedoc June 11, 2024 15:47 Inactive
Copy link
Member

@owenpearson owenpearson left a comment

Choose a reason for hiding this comment

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

Looks good, just one nitpick:

ably.d.ts Outdated Show resolved Hide resolved
@AndyTWF AndyTWF requested a review from owenpearson June 11, 2024 16:11
@github-actions github-actions bot temporarily deployed to staging/pull/1787/features June 11, 2024 16:11 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1787/bundle-report June 11, 2024 16:11 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1787/typedoc June 11, 2024 16:11 Inactive
This allows handlers to make choices depending on the level of the log
being raised (e.g. sending the logs to crashlytics when a certain number
of error-level logs occur).
Copy link
Collaborator

@ttypic ttypic left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@AndyTWF AndyTWF merged commit efb71d0 into main Jun 14, 2024
12 checks passed
@AndyTWF AndyTWF deleted the log-level-in-handler branch June 14, 2024 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants