fix(sqlite-native): replace stderr sql trace logging#4629
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR Review: fix(sqlite-native): replace stderr sql trace loggingThis is a clean, targeted fix that correctly addresses a CLAUDE.md style violation ( Positives
ObservationsPerformance: The use std::sync::LazyLock;
static TRACE_SQL: LazyLock<bool> = LazyLock::new(|| std::env::var("RIVET_TRACE_SQL").is_ok());
// Then in each method:
if *TRACE_SQL {
tracing::trace!(...);
}This is pre-existing behavior that the PR inherited, so it is not a blocker — but worth addressing in a follow-up if not here. Duplicate log lines when When the env var is set, each KV op emits two log lines: the new Minor: the
SummaryThe core fix is correct and aligns with CLAUDE.md. The performance concern with repeated |

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: