Skip to content

fix: changed log level of provider state change transition messages to debug#1987

Open
jarebudev wants to merge 1 commit into
open-feature:mainfrom
jarebudev:1986_log_level_change
Open

fix: changed log level of provider state change transition messages to debug#1987
jarebudev wants to merge 1 commit into
open-feature:mainfrom
jarebudev:1986_log_level_change

Conversation

@jarebudev

Copy link
Copy Markdown
Contributor

This PR

Changes the logging level of provider state change transition messages from info to debug to reduce logging noise.

Related Issues

Fixes #1986

Signed-off-by: jarebudev <23311805+jarebudev@users.noreply.github.com>
@jarebudev jarebudev requested review from a team as code owners July 7, 2026 21:05
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 38a9b540-b826-4450-89ae-37e23a9bba71

📥 Commits

Reviewing files that changed from the base of the PR and between a7d4e8a and 9bfc15b.

📒 Files selected for processing (1)
  • src/main/java/dev/openfeature/sdk/FeatureProviderStateManager.java

📝 Walkthrough

Walkthrough

The log statement in FeatureProviderStateManager's setState method is changed from info level to debug level for provider state transition messages, reducing default log verbosity.

Changes

Log Level Change

Layer / File(s) Summary
Log level downgrade
src/main/java/dev/openfeature/sdk/FeatureProviderStateManager.java
Changed the state transition log message from log.info to log.debug.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Related issues: #1986 - Requests changing the state transition logger from INFO to DEBUG/TRACE level to reduce unnecessary logging.

Suggested labels: logging, minor

Suggested reviewers: N/A

Poem: A rabbit hopped through logs so loud, / INFO shouting to the crowd. / Now hushed to debug, soft and neat, / STALE to READY, a quiet feat. 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: lowering provider state transition logs from INFO to debug.
Description check ✅ Passed The description matches the code change and clearly states the logging-level reduction for provider state transitions.
Linked Issues check ✅ Passed The change satisfies #1986 by changing FeatureProviderStateManager transition logging from INFO to DEBUG.
Out of Scope Changes check ✅ Passed No unrelated code changes are present; the diff is limited to the requested logging-level adjustment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.21%. Comparing base (a7d4e8a) to head (9bfc15b).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1987      +/-   ##
============================================
+ Coverage     92.23%   93.21%   +0.97%     
- Complexity      669      672       +3     
============================================
  Files            59       59              
  Lines          1635     1635              
  Branches        186      186              
============================================
+ Hits           1508     1524      +16     
+ Misses           80       66      -14     
+ Partials         47       45       -2     
Flag Coverage Δ
unittests 93.21% <100.00%> (+0.97%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

providerName = delegate.getMetadata().getName();
}
log.info("Provider {} transitioned from state {} to state {}", providerName, oldState, state);
log.debug("Provider {} transitioned from state {} to state {}", providerName, oldState, state);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we have a higher log level when we transition into and out of the error state?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes I think it's reasonable to log transitions into ERROR and FATAL states at warn/error, and going from ERROR to READY at info. Everything else at debug?
That should reduce the amount of logging noise from every state change being at info, but still having visibility of the more important provider event transitions.

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.

Can this logger be changed from INFO to DEBUG or TRACE.

2 participants