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: logging requirements and logging hook #269

Merged
merged 2 commits into from
Sep 4, 2024
Merged

feat: logging requirements and logging hook #269

merged 2 commits into from
Sep 4, 2024

Conversation

toddbaert
Copy link
Member

@toddbaert toddbaert commented Aug 29, 2024

As discussed in recent meetings, we've had complaints about this from multiple sources. This PR adds a stipulation that no logging is done by the SDK during flag evaluation. It also defines a very simple logging hook concept as an included utility. These should be very simple to write and will provide all the needed logging but give authors more control than built in log statements. It will also be a very nice intro to the hooks concept for users.

Here's the Java implementation: open-feature/java-sdk#1084

Signed-off-by: Todd Baert <[email protected]>
Copy link
Member

@lukas-reining lukas-reining 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!
Left one question.

specification/sections/01-flag-evaluation.md Show resolved Hide resolved
Copy link
Member

@askpt askpt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I have a minor question. With this spec change, will the LogHook become part of the SDK and should it be moved to the SDK repo?

@toddbaert
Copy link
Member Author

LGTM. I have a minor question. With this spec change, will the LogHook become part of the SDK and should it be moved to the SDK repo?

Yep! I've implemented one in Java now here: open-feature/java-sdk#1084

A LoggingHook should have no additional dependencies and is generally valuable, so the idea is they will be included in the SDK just like the in-memory providers.

@toddbaert toddbaert merged commit bcb8cf1 into main Sep 4, 2024
5 checks passed
@toddbaert toddbaert deleted the feat/logging branch September 4, 2024 11:40
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.

6 participants