diff --git a/charts/kubernetes-external-secrets/values.yaml b/charts/kubernetes-external-secrets/values.yaml index c30239be..72315516 100644 --- a/charts/kubernetes-external-secrets/values.yaml +++ b/charts/kubernetes-external-secrets/values.yaml @@ -16,6 +16,8 @@ env: AWS_DEFAULT_REGION: us-west-2 POLLER_INTERVAL_MILLISECONDS: 10000 # Caution, setting this frequency may incur additional charges on some platforms LOG_LEVEL: info + # Print logs level as string ("info") rather than integer (30) + # USE_HUMAN_READABLE_LOG_LEVELS: true METRICS_PORT: 3001 VAULT_ADDR: http://127.0.0.1:8200 # GOOGLE_APPLICATION_CREDENTIALS: /app/gcp-creds/gcp-creds.json diff --git a/config/environment.js b/config/environment.js index 6375c09e..73798329 100644 --- a/config/environment.js +++ b/config/environment.js @@ -24,6 +24,8 @@ const pollerIntervalMilliseconds = process.env.POLLER_INTERVAL_MILLISECONDS ? Number(process.env.POLLER_INTERVAL_MILLISECONDS) : 10000 const logLevel = process.env.LOG_LEVEL || 'info' +const useHumanReadableLogLevels = 'USE_HUMAN_READABLE_LOG_LEVELS' in process.env + const pollingDisabled = 'DISABLE_POLLING' in process.env const rolePermittedAnnotation = process.env.ROLE_PERMITTED_ANNOTATION || 'iam.amazonaws.com/permitted' @@ -43,5 +45,6 @@ module.exports = { namingPermittedAnnotation, pollingDisabled, logLevel, - customResourceManagerDisabled + customResourceManagerDisabled, + useHumanReadableLogLevels } diff --git a/config/index.js b/config/index.js index 7843dd4e..de5f5c1f 100644 --- a/config/index.js +++ b/config/index.js @@ -35,7 +35,8 @@ const logger = pino({ serializers: { err: pino.stdSerializers.err }, - level: envConfig.logLevel + level: envConfig.logLevel, + useLevelLabels: envConfig.useHumanReadableLogLevels }) const customResourceManager = new CustomResourceManager({