Skip to content

logger: pass level to logHandlers when logging#1787

Merged
AndyTWF merged 1 commit intomainfrom
log-level-in-handler
Jun 14, 2024
Merged

logger: pass level to logHandlers when logging#1787
AndyTWF merged 1 commit intomainfrom
log-level-in-handler

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.

@AndyTWF AndyTWF requested review from owenpearson and ttypic June 11, 2024 15:44
@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
@AndyTWF AndyTWF force-pushed the log-level-in-handler branch from 5574079 to 407354b Compare June 11, 2024 15:46
@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:

@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
@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