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

feat: add logger #219

Merged
merged 8 commits into from
Sep 15, 2022
Merged

feat: add logger #219

merged 8 commits into from
Sep 15, 2022

Conversation

beeme1mr
Copy link
Member

Features include:

  • A default logger that writes warning and errors to the console.
  • A safe logger that will wrap user providers loggers to ensure stability
  • Global logger can be updated with a custom logger
  • Clients can be updated with a customer logger
  • Custom client loggers override global loggers

Signed-off-by: Michael Beemer <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
src/client.ts Outdated Show resolved Hide resolved
src/logger.ts Outdated Show resolved Hide resolved
@toddbaert
Copy link
Member

Looks good to me, good testing.

test/logger.spec.ts Outdated Show resolved Hide resolved
@beeme1mr beeme1mr linked an issue Sep 14, 2022 that may be closed by this pull request
test/logger.spec.ts Outdated Show resolved Hide resolved
Signed-off-by: Michael Beemer <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Sep 14, 2022

Codecov Report

Merging #219 (2fe502d) into main (7d15c14) will increase coverage by 0.08%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #219      +/-   ##
==========================================
+ Coverage   99.53%   99.61%   +0.08%     
==========================================
  Files           9       10       +1     
  Lines         429      519      +90     
  Branches       63       84      +21     
==========================================
+ Hits          427      517      +90     
  Misses          2        2              
Impacted Files Coverage Δ
src/client.ts 100.00% <100.00%> (ø)
src/logger.ts 100.00% <100.00%> (ø)
src/open-feature.ts 97.40% <100.00%> (+0.62%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

src/client.ts Outdated Show resolved Hide resolved
src/logger.ts Show resolved Hide resolved
Signed-off-by: Michael Beemer <[email protected]>
Signed-off-by: Michael Beemer <[email protected]>
@beeme1mr beeme1mr merged commit 763f167 into main Sep 15, 2022
@beeme1mr beeme1mr deleted the add-logger branch September 15, 2022 21:08
toddbaert pushed a commit that referenced this pull request Sep 20, 2022
🤖 I have created a release *beep* *boop*
---


##
[0.4.0](js-sdk-v0.3.2...js-sdk-v0.4.0)
(2022-09-20)


### ⚠ BREAKING CHANGES

* improve generic type accuracy (#224)
* convert to chainable methods (#221)
* remove flag evaluation options from the provider interface (#185)
* context transformer and related interfaces removed.

### Features

* add client context mutation
([#207](#207))
([5b0442a](5b0442a))
* add logger ([#219](#219))
([763f167](763f167))
* convert to chainable methods
([#221](#221))
([5253ad9](5253ad9))
* improve generic type accuracy
([#224](#224))
([12230a5](12230a5))
* remove ctx transformer, add provider hooks
([#148](#148))
([260432c](260432c))
* remove flag evaluation options from the provider interface
([#185](#185))
([e9852e4](e9852e4)),
closes [#183](#183)


### Bug Fixes

* Add no-op tests
([#99](#99))
([a341f5c](a341f5c))
* Dont push experiemental branches
([#101](#101))
([0a7a5ec](0a7a5ec))
* Fix publish command
([#103](#103))
([4742ef1](4742ef1))
* Fixing error with setProvider type
([#121](#121))
([df5d214](df5d214))
* update the client to conform to the provider interface
([#187](#187))
([f1edb29](f1edb29))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
lukas-reining pushed a commit that referenced this pull request Jun 29, 2023
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

[FEATURE] Support Logging
4 participants