infra: add logging wrapping
Resolves issues with gcp cloud logging quirks such as field names
This commit is contained in:
@@ -2,10 +2,11 @@ package middleware
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/flowy-live/llink/internal/utils/flog"
|
||||
|
||||
"github.com/flowy-live/llink/internal/auth"
|
||||
)
|
||||
|
||||
@@ -62,7 +63,7 @@ func Auth(authSvc auth.AuthService) func(http.Handler) http.Handler {
|
||||
}
|
||||
|
||||
if err := authSvc.ExtendSession(r.Context(), token); err != nil {
|
||||
slog.Warn("failed to extend session", "error", err)
|
||||
flog.Warn("failed to extend session", "error", err)
|
||||
}
|
||||
|
||||
ctx := WithEmail(r.Context(), session.Email)
|
||||
|
||||
Reference in New Issue
Block a user