infra: add logging wrapping

Resolves issues with gcp cloud logging quirks such as field names
This commit is contained in:
Arjun Patel
2026-05-27 15:49:27 -07:00
parent e804cee229
commit 563c91e7d5
30 changed files with 347 additions and 250 deletions
+3 -2
View File
@@ -4,7 +4,6 @@ import (
"context"
"errors"
"io"
"log/slog"
"net"
"net/http"
"net/url"
@@ -12,6 +11,8 @@ import (
"strings"
"sync"
"time"
"github.com/flowy-live/llink/internal/utils/flog"
)
// LinkMetadata mirrors the TS shape in `js/desktop/src/lib/link-metadata.ts`.
@@ -63,7 +64,7 @@ func (h *Handler) GetLinkMetadata(w http.ResponseWriter, r *http.Request) {
meta, err := fetchLinkMetadata(r.Context(), parsed)
if err != nil {
slog.Warn("link metadata fetch failed", "url", raw, "error", err)
flog.Warn("link metadata fetch failed", "url", raw, "error", err)
writeJSON(w, nil)
return
}