feat(logging): establish logging framework with quiet mode #125

Merged
fuzzy merged 2 commits from feat/logging into main 2026-07-13 17:26:06 +00:00
Owner

What

Create internal/logging package with a simple logger that wraps log package. Support quiet mode (-q flag) to suppress non-error output.

Why

Provides centralized logging for all modules — info messages suppressed in quiet mode, errors always visible.

Testing

  • go vet ./... passes
  • go build ./... passes
  • golangci-lint run ./... passes
  • Pre-commit hooks pass

Breaking Changes

None

Notes

  • Logger.Print/Printf — silent when quiet=true
  • Logger.Error/Errorf — always printed
  • Config struct gains Quiet bool, wired to -q flag and PGET_QUIET env var
  • Help text updated with PGET_QUIET env var entry

Closes #0020
Closes #0021
Closes #0022

## What Create `internal/logging` package with a simple logger that wraps `log` package. Support quiet mode (`-q` flag) to suppress non-error output. ## Why Provides centralized logging for all modules — info messages suppressed in quiet mode, errors always visible. ## Testing - [x] `go vet ./...` passes - [x] `go build ./...` passes - [x] `golangci-lint run ./...` passes - [x] Pre-commit hooks pass ## Breaking Changes None ## Notes - `Logger.Print`/`Printf` — silent when quiet=true - `Logger.Error`/`Errorf` — always printed - Config struct gains `Quiet bool`, wired to `-q` flag and `PGET_QUIET` env var - Help text updated with `PGET_QUIET` env var entry Closes #0020 Closes #0021 Closes #0022
Closes #0020 Closes #0021 Closes #0022
docs(roadmap): mark logging framework complete
All checks were successful
Test and Release / test (pull_request) Successful in 1m47s
Test and Release / lint (pull_request) Successful in 2m49s
cc7d6a7926
fuzzy scheduled this pull request to auto merge when all checks succeed 2026-07-13 17:23:33 +00:00
the.auditor left a comment

Review: APPROVED

Verification

  • go vet ./... passes
  • go build ./... passes
  • golangci-lint v2 run ./... 0 issues
  • Help output (-h) — includes -q flag and PGET_QUIET env var

Changes

  • internal/logging/logging.go (new) — Logger wrapping log with quiet mode
  • internal/config/config.go — Adds Quiet bool, -q flag, PGET_QUIET env var
  • cmd/pget/main.go — Creates logger from config
  • ROADMAP.md — Marks logging items as [x]

Suggestions (non-blocking)

  • #126 — Missing tests for logging package

Closes #0020, #0021, #0022 on merge.

## Review: APPROVED ### Verification - `go vet ./...` — ✅ passes - `go build ./...` — ✅ passes - `golangci-lint v2 run ./...` — ✅ 0 issues - Help output (`-h`) — ✅ includes `-q` flag and `PGET_QUIET` env var ### Changes - `internal/logging/logging.go` (new) — Logger wrapping `log` with quiet mode - `internal/config/config.go` — Adds `Quiet bool`, `-q` flag, `PGET_QUIET` env var - `cmd/pget/main.go` — Creates logger from config - `ROADMAP.md` — Marks logging items as [x] ### Suggestions (non-blocking) - #126 — Missing tests for logging package Closes #0020, #0021, #0022 on merge.
fuzzy merged commit cc7d6a7926 into main 2026-07-13 17:26:06 +00:00
fuzzy deleted branch feat/logging 2026-07-13 17:26:07 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/pget!125
No description provided.