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 #477

Closed

Conversation

PinPinIre
Copy link
Contributor

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.

@PinPinIre PinPinIre requested a review from a team as a code owner August 7, 2020 17:29
@bits-bot
Copy link

bits-bot commented Aug 7, 2020

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

Codecov Report

Merging #477 into master will decrease coverage by 0.30%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #477      +/-   ##
==========================================
- Coverage   87.78%   87.47%   -0.31%     
==========================================
  Files          34       34              
  Lines        2112     2116       +4     
  Branches      416      416              
==========================================
- Hits         1854     1851       -3     
- Misses        258      265       +7     
Impacted Files Coverage Δ
packages/logs/src/logs.entry.ts 50.76% <0.00%> (-1.62%) ⬇️
packages/logs/src/logger.ts 94.11% <100.00%> (+1.34%) ⬆️
packages/rum/src/rum.ts 86.15% <0.00%> (-4.62%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e1ba46d...30673c6. Read the comment docs.

@bcaudan
Copy link
Contributor

bcaudan commented Aug 10, 2020

Thanks for this PR @PinPinIre!
I've fixed the formatting and merged it in #478

@bcaudan bcaudan closed this Aug 10, 2020
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.

4 participants