change: change log-query string value to bool
BREAKING CHANGE As discussed on https://github.com/PostgREST/postgrest/issues/3934#issuecomment-3362806777, this changes log-query to use a bool value, this: - Simplifies config for users. - Reduces effort in testing the different combinations. Closes #3934
This commit is contained in:
committed by
Steve Chavez
parent
e4458abd33
commit
09b088d8ff
@@ -44,8 +44,7 @@ import qualified PostgREST.Unix as Unix (installSignalHandlers)
|
||||
import PostgREST.ApiRequest (ApiRequest (..))
|
||||
import PostgREST.AppState (AppState)
|
||||
import PostgREST.Auth.Types (AuthResult (..))
|
||||
import PostgREST.Config (AppConfig (..), LogLevel (..),
|
||||
LogQuery (..))
|
||||
import PostgREST.Config (AppConfig (..), LogLevel (..))
|
||||
import PostgREST.Error (Error)
|
||||
import PostgREST.Network (resolveSocketToAddress)
|
||||
import PostgREST.Observation (Observation (..))
|
||||
@@ -146,7 +145,7 @@ postgrestResponse appState conf@AppConfig{..} maybeSchemaCache authResult@AuthRe
|
||||
let mainQ = Query.mainQuery plan conf apiReq authResult configDbPreRequest
|
||||
tx = MainTx.mainTx mainQ conf authResult apiReq plan sCache
|
||||
observer = AppState.getObserver appState
|
||||
obsQuery s = when (configLogQuery /= LogQueryDisabled) $ observer $ QueryObs mainQ s
|
||||
obsQuery s = when configLogQuery $ observer $ QueryObs mainQ s
|
||||
|
||||
(txTime, txResult) <- withTiming $ do
|
||||
case tx of
|
||||
|
||||
Reference in New Issue
Block a user