aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/admin/handler.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-15 11:20:24 +0900
committernsfisis <nsfisis@gmail.com>2026-02-15 11:20:24 +0900
commita6b88139afc7c994ddb604757304d44214c00a90 (patch)
treebf24da786c5fb292991fd1ad893522601ce98aa4 /backend/admin/handler.go
parent96fad1a4e78c7209e5a0f3496e8b59d591fbe500 (diff)
downloadphperkaigi-2026-albatross-a6b88139afc7c994ddb604757304d44214c00a90.tar.gz
phperkaigi-2026-albatross-a6b88139afc7c994ddb604757304d44214c00a90.tar.zst
phperkaigi-2026-albatross-a6b88139afc7c994ddb604757304d44214c00a90.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'backend/admin/handler.go')
-rw-r--r--backend/admin/handler.go4
1 files changed, 2 insertions, 2 deletions
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.
}
}()