Skip to content

Go: Reduce package processing log messages to debug level - #22250

Merged
mbg merged 1 commit into
mainfrom
mbg/go/reduce-extraction-noise
Jul 29, 2026
Merged

Go: Reduce package processing log messages to debug level#22250
mbg merged 1 commit into
mainfrom
mbg/go/reduce-extraction-noise

Conversation

@mbg

@mbg mbg commented Jul 29, 2026

Copy link
Copy Markdown
Member

Currently, the Go extractor logs three lines for every package that is extracted successfully:

Processing package name.
Extracting types for package name.
Done extracting types for package name.

In large codebases, this leads to a lot of noise in the output.

This PR moves the first two log messages over to slog.debug so that they are only output when debug-level logging is enabled. slog is already configured appropriately for the extractor by the existing call to SetLogLevel.

Copilot AI review requested due to automatic review settings July 29, 2026 16:34
@mbg
mbg requested review from a team as code owners July 29, 2026 16:34
@github-actions github-actions Bot added the Go label Jul 29, 2026

Copilot AI left a comment

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.

Pull request overview

Reduces routine Go package extraction log noise by moving package processing messages to debug-level structured logging.

Changes:

  • Replaces two per-package log.Printf calls with slog.Debug.
  • Adds package paths as structured log attributes.
Show a summary per file
File Description
go/extractor/extractor.go Moves package processing and type-extraction messages to debug level.

Review details

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Medium

@geoffw0 geoffw0 left a comment

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.

LGTM.

@mbg
mbg merged commit 70b44c8 into main Jul 29, 2026
14 checks passed
@mbg
mbg deleted the mbg/go/reduce-extraction-noise branch July 29, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants