fix: remove red herring warp logs on default log-level

The logs added on e95e815483 are red
herrings under normal operation.

This moves them to `log-level=debug` and removes "error" from the
message prefix.

Fixes https://github.com/PostgREST/postgrest/issues/4799
This commit is contained in:
steve-chavez
2026-04-09 16:44:25 -05:00
committed by Steve Chavez
parent c31aeecdcf
commit 2fb2e86473
5 changed files with 23 additions and 8 deletions
+5 -2
View File
@@ -120,6 +120,9 @@ observationLogger loggerState logLevel obs = case obs of
o@(JwtCacheLookup _) ->
when (logLevel >= LogDebug) $ do
logWithZTime loggerState $ observationMessages o
o@(WarpServerObs _) ->
when (logLevel >= LogDebug) $ do
logWithZTime loggerState $ observationMessages o
o ->
logWithZTime loggerState $ observationMessages o
@@ -235,8 +238,8 @@ observationMessages = \case
pure "Evicted entry from JWT cache"
TerminationUnixSignalObs signal ->
pure $ "Received termination unix signal " <> signal
WarpErrorObs txt ->
pure $ "Warp server error: " <> txt
WarpServerObs txt ->
pure $ "Warp server: " <> txt
where
showMillis :: Double -> Text
showMillis x = toS $ showFFloat (Just 1) x ""