From e646ce5065dffea29272559d02d2c2b923b0ec12 Mon Sep 17 00:00:00 2001 From: Deluan Date: Mon, 27 Jul 2026 14:51:44 -0400 Subject: [PATCH] refactor(artwork): log decoded dimensions as fields, not a formatted string fmt.Sprintf ran on every newly-decoded image even with Debug off, since Go evaluates log arguments regardless of level. Separate width/height fields also query better than a "300x300" string. Correction to e0f1acd1a's message: it said "all 40" messages carry the prefix. The package has 68 log call sites and 62 distinct messages; 40 was only what the test suite happened to exercise. The sweep itself was complete -- zero unprefixed messages remain. --- core/artwork/processor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/artwork/processor.go b/core/artwork/processor.go index 369600b13..af589991a 100644 --- a/core/artwork/processor.go +++ b/core/artwork/processor.go @@ -134,7 +134,7 @@ func (p *processor) acquire(ctx context.Context, item model.ArtworkQueueItem) (o return outcomeFailed, nil } log.Debug(ctx, "Artwork: Decoded new image", "kind", item.ItemKind, "id", item.ItemID, "hash", hash, - "dims", fmt.Sprintf("%dx%d", art.Width, art.Height), "mime", art.Mime, "elapsed", time.Since(decodeStart)) + "width", art.Width, "height", art.Height, "mime", art.Mime, "elapsed", time.Since(decodeStart)) default: log.Warn(ctx, "Artwork: Failed to look up image hash", "kind", item.ItemKind, "id", item.ItemID, err) return outcomeFailed, nil