Change default log-level, from info to error

This commit is contained in:
steve-chavez
2020-10-06 14:21:46 -05:00
committed by Steve Chavez
parent d9a608d9b0
commit ccad9eb9bc
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -26,6 +26,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- #1522, #1528, #1535, Docker images are now built from scratch based on a the static PostgREST executable (#1494) and with Nix instead of a `Dockerfile`. This reduces the compressed image size from over 30mb to about 4mb - @monacoremo
- #1475, Location header for POST request is only included when PK is available on the table (#1461) - @wolfgangwalther
- #1560, Volatile RPC called with GET now returns 405 Method not Allowed instead of 500 - @wolfgangwalther
- #1604, Change the default logging level to `log-level=error`. Only requests with a status greater or equal than 500 will be logged. If you wish to go back to the previous behaviour and log all the requests, use `log-level=info` - @steve-chavez
## [7.0.1] - 2020-05-18
+3 -3
View File
@@ -195,7 +195,7 @@ readPathShowHelp = customExecParser parserPrefs opts
|# raw-media-types="image/png, image/jpg"
|
|## logging level, the admitted values are: crit, error, warn and info.
|# log-level = "info"
|# log-level = "error"
|]
-- | Parse the config file
@@ -266,8 +266,8 @@ readAppConfig cfgPath = do
parseLogLevel :: C.Key -> C.Parser C.Config LogLevel
parseLogLevel k =
C.optional k C.string >>= \case
Nothing -> pure LogInfo
Just "" -> pure LogInfo
Nothing -> pure LogError
Just "" -> pure LogError
Just "crit" -> pure LogCrit
Just "error" -> pure LogError
Just "warn" -> pure LogWarn