From a202c37cdfbd9281399b402b2c0500c35b9759de Mon Sep 17 00:00:00 2001 From: patrick brisbin Date: Wed, 24 Jul 2024 14:33:47 -0400 Subject: [PATCH] Avoid wildcard This ensures we'll break and be intentional if the constructors change in the future. --- Blammo-wai/src/Network/Wai/Middleware/Logging.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Blammo-wai/src/Network/Wai/Middleware/Logging.hs b/Blammo-wai/src/Network/Wai/Middleware/Logging.hs index b037e88..48f4297 100644 --- a/Blammo-wai/src/Network/Wai/Middleware/Logging.hs +++ b/Blammo-wai/src/Network/Wai/Middleware/Logging.hs @@ -155,8 +155,10 @@ requestLoggerWith config env app req respond = getTime = Clock.getTime Clock.Monotonic toMillis x = fromIntegral (Clock.toNanoSecs x) / nsPerMs isRaw = \case + ResponseFile {} -> False + ResponseBuilder {} -> False + ResponseStream {} -> False ResponseRaw {} -> True - _ -> False logRawResponse :: MonadLogger m => Config -> Double -> Request -> m () logRawResponse config@Config {..} duration req =