From a6b88139afc7c994ddb604757304d44214c00a90 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 15 Feb 2026 11:20:24 +0900 Subject: refactor(log): migrate from log to log/slog for structured logging Replace all usages of the standard log package with log/slog across backend and swift worker. Configure Echo's request logger to emit structured log attributes via slog instead of the default format. Co-Authored-By: Claude Opus 4.6 --- backend/admin/handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/admin/handler.go') diff --git a/backend/admin/handler.go b/backend/admin/handler.go index a18e32a..ef19f21 100644 --- a/backend/admin/handler.go +++ b/backend/admin/handler.go @@ -3,7 +3,7 @@ package admin import ( "context" "errors" - "log" + "log/slog" "net/http" "strconv" "time" @@ -268,7 +268,7 @@ func (h *Handler) postUserFetchIcon(c echo.Context) error { go func() { err := account.FetchIcon(context.Background(), h.q, int(row.UserID)) if err != nil { - log.Printf("%v", err) + slog.Error("failed to fetch icon", "error", err) // The failure is intentionally ignored. Retry manually if needed. } }() -- cgit v1.3.1