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

✨ Update context api to include removeContext method #478

Merged
merged 2 commits into from
Aug 10, 2020

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Aug 10, 2020

Motivation

In issue #409 it was suggested updating the logger API to allow users to remove keys from the logger.

Changes

This PR updates the logger API to have a removeContext method that removes a key from the context object. No existing methods have been modified as part of this work.

Testing

To test this new functionality, the user must call removeContext with an existing key. A unit test has been added to test the existing addContext function and the new removeContext function.


I have gone over the contributing documentation.

@bcaudan bcaudan requested a review from a team as a code owner August 10, 2020 07:29
@bcaudan bcaudan merged commit d05cd80 into master Aug 10, 2020
@bcaudan bcaudan deleted the PinPinIre-issue#409-context-remove-method branch August 10, 2020 07:29
@buenjybar
Copy link
Contributor

Do you think you could do the same for addLoggerGlobalContext and create a removeLoggerGlobalContext?
as well for the RUM package? it seems that it is easy to add context but not easy to remove it.

@bcaudan
Copy link
Contributor Author

bcaudan commented Oct 30, 2020

@buenjybar, a bit late on that but it has been added in v1.20.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants