diff --git a/docs/development/configuration.md b/docs/development/configuration.md index 8f50e1ba6a0f77..549c44712c0c32 100644 --- a/docs/development/configuration.md +++ b/docs/development/configuration.md @@ -38,7 +38,6 @@ e.g. apply one set of labels for `backend/package.json` and a different set of l module.exports = { npmrc: '//registry.npmjs.org/:_authToken=abc123', baseDir: '/tmp/renovate', - logLevel: 'debug', includeForks: true, gradle: { enabled: false }, }; @@ -53,6 +52,8 @@ $ node renovate --help To configure any `` items, separate with commas. E.g. `renovate --labels=renovate,dependency`. +To enable debug logging export `LOG_LEVEL=debug` to your environment. + ### renovate.json If you add a `renovate.json` file to the root of your repository, you can use this to override default settings. diff --git a/docs/usage/self-hosted-configuration.md b/docs/usage/self-hosted-configuration.md index d3f0ed28e127ac..fe78ebafa235de 100644 --- a/docs/usage/self-hosted-configuration.md +++ b/docs/usage/self-hosted-configuration.md @@ -168,6 +168,8 @@ By configuring using the environment it means that debug logging starts from the Additionally, if you configure `LOG_FORMAT=json` in env then logging will be done in JSON format instead of "pretty" format, which is usually better if you're doing any ingestion or parsing of the logs. +Warning: Configuring `logLevel` config option or `--log-level` cli option is deprecated and will be removed in a major version. + ## onboarding Set this to `false` if (a) you configure Renovate entirely on the bot side (i.e. empty `renovate.json` in repositories) and (b) you wish to run Renovate on every repository the bot has access to, and (c) you wish to skip the onboarding PRs. diff --git a/docs/usage/self-hosting.md b/docs/usage/self-hosting.md index cf97f61382179b..91624d10f64ecf 100644 --- a/docs/usage/self-hosting.md +++ b/docs/usage/self-hosting.md @@ -99,7 +99,6 @@ metadata: data: config.json: |- { - "logLevel" : "debug", "repositories": ["orgname/repo","username/repo"], "dryRun" : "true" } @@ -274,7 +273,6 @@ module.exports = { endpoint: 'https://self-hosted.gitlab/api/v4/', token: '**gitlab_token**', platform: 'gitlab', - logLevel: 'debug', onboardingConfig: { extends: ['config:base'], }, diff --git a/lib/config/config/__fixtures__/file.js b/lib/config/config/__fixtures__/file.js index 61600196f14b7d..e4fe0d85493f41 100644 --- a/lib/config/config/__fixtures__/file.js +++ b/lib/config/config/__fixtures__/file.js @@ -1,5 +1,4 @@ // @ts-ignore module.exports = { token: 'abcdefg', - logLevel: 'error' }; diff --git a/lib/config/config/__fixtures__/with-force.js b/lib/config/config/__fixtures__/with-force.js index d16cae37e45284..ad2b1074fb23d4 100644 --- a/lib/config/config/__fixtures__/with-force.js +++ b/lib/config/config/__fixtures__/with-force.js @@ -1,7 +1,6 @@ // @ts-ignore module.exports = { token: 'abcdefg', - logLevel: 'error', force: { schedule: null, } diff --git a/lib/config/definitions.ts b/lib/config/definitions.ts index f4c66a57d99fca..eef3b2ce37e613 100644 --- a/lib/config/definitions.ts +++ b/lib/config/definitions.ts @@ -342,11 +342,10 @@ const options: RenovateOptions[] = [ // Log options { name: 'logLevel', - description: 'Logging level', + description: 'Logging level. Deprecated, use `LOG_LEVEL` environment.', stage: 'global', type: 'string', allowedValues: ['fatal', 'error', 'warn', 'info', 'debug', 'trace'], - default: 'info', env: 'LOG_LEVEL', }, { diff --git a/lib/config/file.spec.ts b/lib/config/file.spec.ts index 4eeed34655d5fd..f5eb41da982383 100644 --- a/lib/config/file.spec.ts +++ b/lib/config/file.spec.ts @@ -37,7 +37,6 @@ describe('config/file', () => { "platform": "github", "token":"abcdef", "logFileLevel": "warn", - "logLevel": "info", "onboarding": false, "gitAuthor": "Renovate Bot " "onboardingConfig": { diff --git a/lib/config/index.ts b/lib/config/index.ts index 0f4699091c0fa9..44c803cd2c4ecc 100644 --- a/lib/config/index.ts +++ b/lib/config/index.ts @@ -80,8 +80,14 @@ export async function parseConfigs( delete config.privateKeyPath; } - // Set log level - levels('stdout', config.logLevel); + // Deprecated set log level: https://github.com/renovatebot/renovate/issues/8291 + // istanbul ignore if + if (config.logLevel) { + logger.warn( + 'Configuring logLevel is deprecated. Use LOG_LEVEL environment variable instead' + ); + levels('stdout', config.logLevel); + } if (config.logContext) { // This only has an effect if logContext was defined via file or CLI, otherwise it would already have been detected in env