-
Notifications
You must be signed in to change notification settings - Fork 33
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: logging hook #1114
base: main
Are you sure you want to change the base?
feat: logging hook #1114
Conversation
feat: adds info and debug implementations to DefaultLogger Signed-off-by: Kevin Long <kmlong1183@gmail.com>
Signed-off-by: Kevin Long <kmlong1183@gmail.com>
…e Logger Signed-off-by: Kevin Long <kmlong1183@gmail.com>
Signed-off-by: Kevin Long <kmlong1183@gmail.com>
|
||
export class LoggingHook implements BaseHook { | ||
readonly includeEvaluationContext: boolean = false; | ||
readonly logger = new SafeLogger(new DefaultLogger(true, true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please allow a custom logger to be passed in the constructor. If one isn't provided, we can fall back on what you have here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@beeme1mr This has been addressed with latest commit.
this.logger.error(payload); | ||
} | ||
|
||
finally(hookContext: Readonly<HookContext<FlagValue>>, hookHints?: HookHints): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure to rebase your PR. This method signature has changed recently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@beeme1mr This has been addressed with latest commit.
private readonly showInfo : boolean = false; | ||
private readonly showDebug : boolean = false; | ||
|
||
constructor(showInfo: boolean = false, showDebug: boolean = false){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps a log-level argument could work well. It could default to "warn" by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@beeme1mr This has been addressed with latest commit.
private readonly showInfo : boolean = false; | ||
private readonly showDebug : boolean = false; | ||
|
||
constructor(showInfo: boolean = false, showDebug: boolean = false){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please insider this @kevinmlong.
Having the level configurable via env vars is common and most useful when deployed. Having to rebuild your Dockerfile or even commit a changed log level in case you need to observe something in a deployed instance would not be too practical to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lukas-reining - I'm all for being able to pass in configuration from the environment. Perhaps I'm confused though. Wouldn't the applications making use of the hook and the DefaultLogger be where the parameters passed in come from the environment? Perhaps the switch to passing in a LogLevel parameter resolved this as the the client implementation of the SDK would pass in process.env.LOG_LEVEL
where appropriate.
## This PR - adds evaluation details to the `finally` stage in hooks. ### Notes This breaks the signature of the `finally` stages based on [this spec enhancement](open-feature/spec#280). It is **not** considered a breaking change to the SDK because hooks are marked as experimental in the spec, and the change has no impact on known hooks. The noteworthy change to the interface is: ```diff - finally?(hookContext: Readonly<HookContext<T>>, hookHints?: HookHints): HooksReturn; + finally?(hookContext: Readonly<HookContext<T>>, evaluationDetails: EvaluationDetails<T>, hookHints?: HookHints): HooksReturn; ``` ### Follow-up Tasks - Update the JS contribs repo --------- Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
…re#1065) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@typescript-eslint/eslint-plugin](https://typescript-eslint.io/packages/eslint-plugin) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)) | [`7.11.0` -> `7.18.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/7.11.0/7.18.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2feslint-plugin/7.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@typescript-eslint%2feslint-plugin/7.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@typescript-eslint%2feslint-plugin/7.11.0/7.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2feslint-plugin/7.11.0/7.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@typescript-eslint/parser](https://typescript-eslint.io/packages/parser) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | [`7.11.0` -> `7.18.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/7.11.0/7.18.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2fparser/7.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@typescript-eslint%2fparser/7.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@typescript-eslint%2fparser/7.11.0/7.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2fparser/7.11.0/7.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/eslint-plugin)</summary> ### [`v7.18.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7180-2024-07-29) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.17.0...v7.18.0) ##### 🩹 Fixes - **eslint-plugin:** \[no-unnecessary-type-assertion] prevent runtime error when asserting a variable declared in default TS lib - **eslint-plugin:** \[unbound-method] report on destructuring in function parameters - **eslint-plugin:** \[no-duplicate-type-constituents] shouldn't report on error types - **eslint-plugin:** \[strict-boolean-expressions] support branded booleans ##### ❤️ Thank You - auvred - Oliver Salzburg - Vinccool96 - Yukihiro Hasegawa You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.17.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7170-2024-07-22) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.16.1...v7.17.0) ##### 🚀 Features - **eslint-plugin:** backport no-unsafe-function type, no-wrapper-object-types from v8 to v7 - **eslint-plugin:** \[return-await] add option to report in error-handling scenarios only, and deprecate "never" ##### 🩹 Fixes - **eslint-plugin:** \[no-floating-promises] check top-level type assertions (and more) - **eslint-plugin:** \[strict-boolean-expressions] consider assertion function argument a boolean context - **eslint-plugin:** \[no-unnecessary-condition] false positive on optional private field ##### ❤️ Thank You - Armano - Josh Goldberg ✨ - Kirk Waiblinger - StyleShit You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.16.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7161-2024-07-15) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.16.0...v7.16.1) ##### 🩹 Fixes - **eslint-plugin:** \[no-unnecessary-type-parameters] descend into all parts of mapped types in no-unnecessary-type-parameters ##### ❤️ Thank You - Dan Vanderkam You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.16.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7160-2024-07-08) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.15.0...v7.16.0) ##### 🚀 Features - **rule-tester:** stricter rule test validations - **eslint-plugin:** \[no-unnecessary-parameter-property-assignment] add new rule - **eslint-plugin:** add support for nested namespaces to unsafe-member-access - **eslint-plugin:** \[no-floating-promises] add checkThenables option ##### 🩹 Fixes - **deps:** update dependency [@​eslint-community/regexpp](https://redirect.github.com/eslint-community/regexpp) to v4.11.0 - **eslint-plugin:** \[no-floating-promises] add `suggestions` to tests from [#​9263](https://redirect.github.com/typescript-eslint/typescript-eslint/issues/9263) `checkThenables` - **website:** react key error on internal pages of website - **eslint-plugin:** \[restrict-template-expressions] don't report tuples if `allowArray` option is enabled ##### ❤️ Thank You - Abraham Guo - auvred - Josh Goldberg ✨ - Juan Sanchez - Vinccool96 - YeonJuan - Yukihiro Hasegawa You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.15.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7150-2024-07-01) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.14.1...v7.15.0) ##### 🚀 Features - **eslint-plugin:** \[array-type] detect `Readonly<string[]>` case - **eslint-plugin:** back-port new rules around empty object types from v8 ##### 🩹 Fixes - disable `EXPERIMENTAL_useProjectService` in `disabled-type-checked` shared config - **eslint-plugin:** \[no-unsafe-return] differentiate a types-error any from a true any - **eslint-plugin:** \[no-unsafe-call] differentiate a types-error any from a true any ##### ❤️ Thank You - auvred - Kim Sang Du - rgehbt - Vinccool96 You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.14.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7141-2024-06-24) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.14.0...v7.14.1) ##### 🩹 Fixes - **eslint-plugin:** \[prefer-nullish-coalescing] treat enums and literals as their underlying primitive types - **eslint-plugin:** \[prefer-nullish-coalescing] ensure ternary fix does not remove parens ##### ❤️ Thank You - Jake Bailey You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.14.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7140-2024-06-24) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.13.1...v7.14.0) ##### 🚀 Features - support TypeScript 5.5 ##### 🩹 Fixes - **eslint-plugin:** \[no-extraneous-class] handle abstract members - **eslint-plugin:** \[prefer-nullish-coalescing] handle intersected primitive types - **eslint-plugin:** \[no-invalid-this] support AccessorProperty ##### ❤️ Thank You - Brad Zacher - cm-ayf - Jake Bailey - James Zhan - Joshua Chen - yoshi2no You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.13.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7131-2024-06-17) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.13.0...v7.13.1) ##### 🩹 Fixes - **eslint-plugin:** \[prefer-readonly] refine report locations - **eslint-plugin:** \[return-await] support explicit resource management - **eslint-plugin:** \[no-unsafe-member-access] differentiate a types-error any from a true any ##### ❤️ Thank You - Kirk Waiblinger - Yukihiro Hasegawa You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.13.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7130-2024-06-10) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.12.0...v7.13.0) ##### 🚀 Features - **typescript-estree:** require `import = require()` argument to be a string literal - **typescript-estree:** forbid `.body`, `.async`, `.generator` on `declare function` - **eslint-plugin:** \[no-dynamic-delete] allow all string literals as index ##### 🩹 Fixes - **ast-spec:** function-call-like callee should be Expression not LeftHandSideExpression - **scope-manager:** handle index signature in class - **eslint-plugin:** \[init-declarations] refine report locations - **eslint-plugin:** \[no-base-to-string] make error message more nuanced - **eslint-plugin:** \[no-unsafe-assignment] be more specific about error types - **eslint-plugin:** \[no-magic-numbers] fix implementation of the `ignore` option ##### ❤️ Thank You - Fotis Papadogeorgopoulos - Joshua Chen - Kirk Waiblinger - Tobiloba Adedeji - Vinccool96 - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.12.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#7120-2024-06-03) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.11.0...v7.12.0) ##### 🚀 Features - **eslint-plugin:** \[no-useless-template-literals] rename to `no-useless-template-expression` (deprecate `no-useless-template-literals`) - **rule-tester:** check for parsing errors in suggestion fixes - **rule-tester:** port `checkDuplicateTestCases` from ESLint - **eslint-plugin:** \[no-floating-promises] add option 'allowForKnownSafePromises' ##### 🩹 Fixes - no-useless-template-expression -> no-unnecessary-template-expression - **eslint-plugin:** \[no-unnecessary-type-assertion] combine template literal check with `const` variable check - **eslint-plugin:** \[dot-notation] fix false positive when accessing private/protected property with optional chaining - **eslint-plugin:** \[explicit-member-accessibility] refine report locations - **eslint-plugin:** \[no-unnecessary-type-assertion] declares are always defined, so always check `declare`s - **eslint-plugin:** \[prefer-literal-enum-member] allow using member it self on allowBitwiseExpressions - **eslint-plugin:** \[return-await] clean up in-try-catch detection and make autofixes safe - **eslint-plugin:** \[member-ordering] also TSMethodSignature can be get/set ##### ❤️ Thank You - Abraham Guo - Han Yeong-woo - Joshua Chen - Kim Sang Du - Kirk Waiblinger - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. </details> <details> <summary>typescript-eslint/typescript-eslint (@​typescript-eslint/parser)</summary> ### [`v7.18.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#7180-2024-07-29) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.17.0...v7.18.0) This was a version bump only for parser to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.17.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#7170-2024-07-22) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.16.1...v7.17.0) This was a version bump only for parser to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.16.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#7161-2024-07-15) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.16.0...v7.16.1) This was a version bump only for parser to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.16.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#7160-2024-07-08) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.15.0...v7.16.0) ##### 🩹 Fixes - **deps:** update dependency [@​eslint-community/regexpp](https://redirect.github.com/eslint-community/regexpp) to v4.11.0 - **website:** react key error on internal pages of website ##### ❤️ Thank You - Abraham Guo - auvred - Josh Goldberg ✨ - Juan Sanchez - Vinccool96 - YeonJuan - Yukihiro Hasegawa You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.15.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#7150-2024-07-01) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.14.1...v7.15.0) This was a version bump only for parser to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.14.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#7141-2024-06-24) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.14.0...v7.14.1) This was a version bump only for parser to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.14.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#7140-2024-06-24) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.13.1...v7.14.0) ##### 🚀 Features - support TypeScript 5.5 ##### ❤️ Thank You - Brad Zacher - cm-ayf - Jake Bailey - James Zhan - Joshua Chen - yoshi2no You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.13.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#7131-2024-06-17) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.13.0...v7.13.1) This was a version bump only for parser to align it with other projects, there were no code changes. You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.13.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#7130-2024-06-10) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.12.0...v7.13.0) ##### 🚀 Features - **parser, typescript-estree:** export withoutProjectParserOptions utility ##### ❤️ Thank You - Fotis Papadogeorgopoulos - Joshua Chen - Kirk Waiblinger - Tobiloba Adedeji - Vinccool96 - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. ### [`v7.12.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#7120-2024-06-03) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.11.0...v7.12.0) ##### 🩹 Fixes - **types:** correct typing ParserOptions ##### ❤️ Thank You - Abraham Guo - Han Yeong-woo - Joshua Chen - Kim Sang Du - Kirk Waiblinger - YeonJuan You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled because a matching PR was automerged previously. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-feature/js-sdk). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMzMuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEzMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [1.6.0](open-feature/js-sdk@core-v1.5.0...core-v1.6.0) (2024-12-12) ### ⚠ BREAKING CHANGES The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### ✨ New Features * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### 🔄 Refactoring * improve track interface for providers ([open-feature#1100](open-feature#1100)) ([5e5b160](open-feature@5e5b160)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [1.4.0](open-feature/js-sdk@web-sdk-v1.3.2...web-sdk-v1.4.0) (2024-12-18) ### ⚠ BREAKING CHANGES The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### ✨ New Features * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### 📚 Documentation * fix comment in README for Hook’s after method ([open-feature#1102](open-feature#1102)) ([ba8d1ae](open-feature@ba8d1ae)) ### 🔄 Refactoring * improve track interface for providers ([open-feature#1100](open-feature#1100)) ([5e5b160](open-feature@5e5b160)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [1.17.0](open-feature/js-sdk@server-sdk-v1.16.2...server-sdk-v1.17.0) (2024-12-18) ### ⚠ BREAKING CHANGES The signature of the `finally` hook stage has been changed. The signature now includes the `evaluation details`, as per the [OpenFeature specification](https://openfeature.dev/specification/sections/hooks#requirement-438). Note that since hooks are still `experimental,` this does not constitute a change requiring a new major version. To migrate, update any hook that implements the `finally` stage to accept `evaluation details` as the second argument. * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### ✨ New Features * add evaluation details to finally hook ([open-feature#1087](open-feature#1087)) ([2135254](open-feature@2135254)) ### 📚 Documentation * fix comment in README for Hook’s after method ([open-feature#1103](open-feature#1103)) ([e335615](open-feature@e335615)) ### 🔄 Refactoring * improve track interface for providers ([open-feature#1100](open-feature#1100)) ([5e5b160](open-feature@5e5b160)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.4.10](open-feature/js-sdk@react-sdk-v0.4.9...react-sdk-v0.4.10) (2024-12-18) ### 🔄 Refactoring * export public option types ([open-feature#1101](open-feature#1101)) ([16321c3](open-feature@16321c3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Kevin Long <kmlong1183@gmail.com>
432fc43
to
3149620
Compare
Signed-off-by: Kevin Long <kmlong1183@gmail.com>
3149620
to
c4c4620
Compare
This PR
This PR provides a LoggingHook implementation and the related tests. Additionally, this PR adds a constructor with two parameters to allow users to forcefully show the
info
anddebug
logging levels.Related Issues
Implements #998
How to test
Test harness now has a
logger-hook.spec.ts
that appropriately checks that the appropriate logging levels are called and provide the expected output.