ENG-10963 refactor(log): migrate reflex-base and component packages to logging (2/5) - #6864
ENG-10963 refactor(log): migrate reflex-base and component packages to logging (2/5)#6864FarhanAliRaza wants to merge 2 commits into
Conversation
Greptile SummaryThe PR migrates legacy console calls in reflex-base and several component packages to per-module standard-library loggers.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains in the eligible follow-up review scope. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/reflex-base/src/reflex_base/config.py | Migrates configuration warnings and debug output to module logging and ensures managed worker logging is configured during Config initialization. |
| packages/reflex-base/src/reflex_base/event/processor/event_processor.py | Replaces manually formatted tracebacks with logger.exception while retaining active exception context at each call site. |
| packages/reflex-base/src/reflex_base/plugins/sitemap.py | Migrates skipped-route warnings to the sitemap module logger without changing sitemap generation behavior. |
| tests/units/plugins/test_sitemap.py | Updates warning assertions to inspect only warning records emitted by the sitemap logger. |
| tests/units/test_config.py | Updates plugin-warning tests to validate captured standard logging records. |
Reviews (7): Last reviewed commit: "fix(log): review fixes for the reflex-ba..." | Re-trigger Greptile
Merging this PR will not alter performance
Performance Changes
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 666df42e4f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
1 issue found across 28 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/reflex-components-plotly/src/reflex_components_plotly/plotly.py">
<violation number="1" location="packages/reflex-components-plotly/src/reflex_components_plotly/plotly.py:21">
P2: Since `reflex_components_plotly` can be installed and imported standalone (without `import reflex`), this warning is emitted via a module logger that may never get the Reflex logging handlers attached (those are only wired up through the Reflex config bootstrap). In that case the warning falls back to Python logging's default stderr handler, bypassing options like `REFLEX_LOG_JSON`/`REFLEX_ENABLE_FULL_LOGGING` and potentially polluting a JSON-structured log stream with a plain-text line. Consider ensuring the logging pipeline is configured (or lazily bootstrapped) before emitting logs from standalone component packages.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
666df42 to
03b7704
Compare
The merge-base changed after approval.
cc5b0a5 to
274376c
Compare
Replace console.debug/info/warn/error call sites with per-module logging.getLogger(__name__) loggers across reflex-base and the component packages. No behavior change beyond the new sink.
- drop the console import left dead by the event handler warning migration - scope the sitemap tests to the plugin's own logger so unrelated warnings cannot break the exact-count assertions - name the news fragments after the PR
274376c to
ee282c1
Compare
Replaces
console.debug/info/warn/errorcall sites with per-modulelogging.getLogger(__name__)loggers across reflex-base and the component packages (core, lucide, plotly, dataeditor, react-player). No behavior change beyond the new sink.Stack (ENG-10963)
#6863 → this → #6865 → #6866 → #6867.
Merge in order; each PR is based on the previous branch.