@@ -63,7 +63,7 @@ response ii settings Context{outputQ} mgr tconf th strm req rsp
6363 !isHead = requestMethod req == H.methodHead
6464 !s0 = responseStatus rsp
6565 !hs0 = responseHeaders rsp
66− !logger = S.settingsLogger settings req
66+ !logger = S.settingsLogger settings
6767
6868 -- Ideally, log messages should be written when responses are
6969 -- actually sent. But there is no way to keep good memory usage
@@ -76,7 +76,7 @@ response ii settings Context{outputQ} mgr tconf th strm req rsp
7676 responseBuilderBody s hs bdy = responseBuilderCore s hs bdy OneshotWithBody
7777
7878 responseBuilderCore s hs bdy binfo = do
79− logger s Nothing
79+ logger req s Nothing
8080 setThreadContinue tconf True
8181 let rsp' = ResponseBuilder s hs bdy
8282 out = OResponse strm rsp' binfo
@@ -94,9 +94,11 @@ response ii settings Context{outputQ} mgr tconf th strm req rsp
9494 responseFileXXX path mpart = responseFile2XX s0 hs0 path mpart
9595
9696 responseFile2XX s hs path mpart
97− | isHead = responseNoBody s hs
97+ | isHead = do
98+ logger req s Nothing
99+ responseNoBody s hs
98100 | otherwise = do
99− logger s (filePartByteCount <$> mpart)
101+ logger req s (filePartByteCount <$> mpart)
100102 setThreadContinue tconf True
101103 let rsp' = ResponseFile s hs path mpart
102104 out = OResponse strm rsp' OneshotWithBody
@@ -110,7 +112,7 @@ response ii settings Context{outputQ} mgr tconf th strm req rsp
110112 body = byteString "File not found"
111113
112114 responseStreaming strmbdy = do
113− logger s0 Nothing
115+ logger req s0 Nothing
114116 -- We must not exit this WAI application.
115117 -- If the application exits, streaming would be also closed.
116118 -- So, this work occupies this thread.