Repository navigation
fix(logging): emit the spec DEBUG logs through log/slog at debug level - #111
Merged
Merged
Conversation
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #110
The log lines the spec marks as DEBUG no longer print on every request. They go through the standard library's
log/slogat debug level, so they are hidden by default, the way the other engines filter them, and an operator can turn them on withslog.SetLogLoggerLevel(slog.LevelDebug). No new config field and no new dependency.Changed sites:
logCountryCheckResult: theno_rules,no_geolocationandloopback_exemptverdicts (specs/02-config.md:174). Theblocked,whitelistedandnot_affectedverdicts keep their configurable levels.Request blocked by <check>(specs/03-pipeline.md:137). It carriescheck,pathandmethodas slog attributes (specs/03-pipeline.md:179) and still respectsmuted_check_logs.ipextraction.go, which was already tagged[debug].I checked every DEBUG mandate in
specs/*.md; these are the only ones. The configurable level knobs (log_request_level,log_suspicious_level,log_country_check_level) are unchanged.Tests:
TestSpecDebugLogsFollowSlogLevelfails on master (all five lines print at the default level) and passes here. It checks that nothing prints at the default level, that the lines and attributes appear at debug, and thatmuted_check_logsstill silences the blocked-by line. gofmt, go vet, staticcheck, the unit and integration suites and the conformance suite pass locally.coverage_waivers.txtline numbers shift with the edits. The local coverage gate reports the same count on this branch as on clean master, so CI on Linux is the real check.Found while wiring gin-guard into Ollama, where an unconfigured country check printed one line per request.