Rename LOG_4XX to ENABLE_4XX_HTTP_LOGGING and enable by default
This commit is contained in:
parent
c78b21ef5f
commit
91e63c8ec4
|
@ -83,7 +83,7 @@ const environment = {
|
|||
SESSION_UPDATE_PERIOD: process.env.SESSION_UPDATE_PERIOD,
|
||||
DEPLOYMENT_ENVIRONMENT:
|
||||
process.env.DEPLOYMENT_ENVIRONMENT || "docker-compose",
|
||||
LOG_4XX: process.env.LOG_4XX,
|
||||
ENABLE_4XX_HTTP_LOGGING: process.env.ENABLE_4XX_HTTP_LOGGING || true,
|
||||
_set(key: any, value: any) {
|
||||
process.env[key] = value
|
||||
// @ts-ignore
|
||||
|
|
|
@ -9,7 +9,7 @@ export async function errorHandling(ctx: any, next: any) {
|
|||
const status = err.status || err.statusCode || 500
|
||||
ctx.status = status
|
||||
|
||||
if (status > 499 || env.LOG_4XX) {
|
||||
if (status > 499 || env.ENABLE_4XX_HTTP_LOGGING) {
|
||||
ctx.log.error(err)
|
||||
}
|
||||
|
||||
|
|
|
@ -3,3 +3,4 @@ process.env.MULTI_TENANCY = "1"
|
|||
process.env.NODE_ENV = "jest"
|
||||
process.env.MOCK_REDIS = "1"
|
||||
process.env.LOG_LEVEL = process.env.LOG_LEVEL || "error"
|
||||
process.env.ENABLE_4XX_HTTP_LOGGING = "0"
|
||||
|
|
|
@ -6,4 +6,5 @@ process.env.MULTI_TENANCY = "1"
|
|||
// @ts-ignore
|
||||
process.env.BUDIBASE_DIR = tmpdir("budibase-unittests")
|
||||
process.env.LOG_LEVEL = process.env.LOG_LEVEL || "error"
|
||||
process.env.ENABLE_4XX_HTTP_LOGGING = "0"
|
||||
process.env.MOCK_REDIS = "1"
|
||||
|
|
|
@ -2,6 +2,7 @@ process.env.SELF_HOSTED = "0"
|
|||
process.env.NODE_ENV = "jest"
|
||||
process.env.JWT_SECRET = "test-jwtsecret"
|
||||
process.env.LOG_LEVEL = process.env.LOG_LEVEL || "error"
|
||||
process.env.ENABLE_4XX_HTTP_LOGGING = "0"
|
||||
process.env.MULTI_TENANCY = "1"
|
||||
process.env.MINIO_URL = "http://localhost"
|
||||
process.env.MINIO_ACCESS_KEY = "test"
|
||||
|
|
Loading…
Reference in New Issue