aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/api
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/api
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/api')
-rw-r--r--backend/api/handler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/api/handler.go b/backend/api/handler.go
index 9f8849c..05a185a 100644
--- a/backend/api/handler.go
+++ b/backend/api/handler.go
@@ -4,7 +4,7 @@ import (
"context"
"encoding/json"
"errors"
- "log"
+ "log/slog"
"net/http"
"strconv"
"time"
@@ -47,7 +47,7 @@ func (h *Handler) PostLogin(ctx context.Context, request PostLoginRequestObject)
password := request.Body.Password
userID, err := auth.Login(ctx, h.q, username, password)
if err != nil {
- log.Printf("login failed: %v", err)
+ slog.Error("login failed", "error", err)
var msg string
if errors.Is(err, auth.ErrForteeLoginTimeout) {
msg = "ログインに失敗しました"