Add log-level config

This commit is contained in:
steve-chavez
2020-10-06 14:21:46 -05:00
committed by Steve Chavez
parent 60398ad538
commit e9efcc70a5
8 changed files with 34 additions and 18 deletions
+3 -3
View File
@@ -65,9 +65,9 @@ import PostgREST.Types
import Protolude hiding (Proxy, intercalate, toS)
import Protolude.Conv (toS)
postgrest :: LogSetup -> IORef AppConfig -> IORef (Maybe DbStructure) -> P.Pool -> IO UTCTime -> IO () -> Application
postgrest logS refConf refDbStructure pool getTime connWorker =
pgrstMiddleware logS $ \ req respond -> do
postgrest :: LogLevel -> IORef AppConfig -> IORef (Maybe DbStructure) -> P.Pool -> IO UTCTime -> IO () -> Application
postgrest logLev refConf refDbStructure pool getTime connWorker =
pgrstMiddleware logLev $ \ req respond -> do
time <- getTime
body <- strictRequestBody req
maybeDbStructure <- readIORef refDbStructure