Files
Tosone d057d934c7 feat(logger): log polled database queries at trace level
Long running daemons poll the database for pending work every few seconds,
which drowns the debug log in "call database" entries with zero rows.

Mark those queries with a context flag: logger.WithQuietDatabaseTrace
downgrades their gorm trace log one level below debug (the new LevelTrace)
and skips the caller stack walk. log.level=trace now enables that level
instead of being an alias of debug, so the polled queries stay available
when they are actually wanted.

The builder cron query and the vulnerability claim transaction mark their
context, so their SQL only shows up when trace logging is on.

Verification:
- go test -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/logger/...
- CI_DATABASE_TYPE=turso go test -parallel 1 -tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/dal/repository/builder/... ./pkg/dal/repository/registry/...
- golangci-lint run --build-tags "netgo,timetzdata,exclude_graphdriver_btrfs,containers_image_openpgp" ./pkg/logger/... ./pkg/dal/repository/builder/... ./pkg/dal/repository/registry/...
2026-10-28 15:05:24 +08:00
..
2026-08-01 20:32:49 +08:00