chore: reduce logging
This commit is contained in:
parent
88a124e8c2
commit
56e9212e65
@ -250,13 +250,13 @@ makeFoundation appSettings''@AppSettings{..} = do
|
|||||||
conn <- liftIO . PG.connectPostgreSQL $ pgConnStr appDatabaseConf
|
conn <- liftIO . PG.connectPostgreSQL $ pgConnStr appDatabaseConf
|
||||||
backend <- liftIO $ openSimpleConn logFunc conn
|
backend <- liftIO $ openSimpleConn logFunc conn
|
||||||
observeDatabaseConnectionOpened
|
observeDatabaseConnectionOpened
|
||||||
$logInfoS "SqlPool" "Opened connection"
|
$logDebugS "SqlPool" "Opened connection"
|
||||||
return backend
|
return backend
|
||||||
destroy conn = do
|
destroy conn = do
|
||||||
$logDebugS "SqlPool" "Closing connection..."
|
$logDebugS "SqlPool" "Closing connection..."
|
||||||
liftIO $ connClose conn
|
liftIO $ connClose conn
|
||||||
observeDatabaseConnectionClosed
|
observeDatabaseConnectionClosed
|
||||||
$logInfoS "SqlPool" "Closed connection"
|
$logDebugS "SqlPool" "Closed connection"
|
||||||
in Custom.createPool (liftIO . flip runLoggingT logFunc) create destroy (Just . fromIntegral $ pgPoolIdleTimeout appDatabaseConf) (Just $ pgPoolSize appDatabaseConf)
|
in Custom.createPool (liftIO . flip runLoggingT logFunc) create destroy (Just . fromIntegral $ pgPoolIdleTimeout appDatabaseConf) (Just $ pgPoolSize appDatabaseConf)
|
||||||
let sqlPool :: forall m. MonadIO m => Custom.Pool m SqlBackend
|
let sqlPool :: forall m. MonadIO m => Custom.Pool m SqlBackend
|
||||||
sqlPool = Custom.hoistPool (liftIO . flip runLoggingT logFunc) sqlPool'
|
sqlPool = Custom.hoistPool (liftIO . flip runLoggingT logFunc) sqlPool'
|
||||||
|
|||||||
Reference in New Issue
Block a user