Skip to content
Snippets Groups Projects
Commit 95ac1099 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

feat: remove logLevel support in config (#9390)

Remove support for logLevel in config. Must be configured using LOG_LEVEL instead.

Closes #8291

BREAKING CHANGE: Configure LOG_LEVEL in env and not in config or CLI
parent 57015047
No related branches found
No related tags found
No related merge requests found
......@@ -233,18 +233,6 @@ If left as default (null), a random short ID will be selected.
## logFileLevel
## logLevel
We recommend that you run the Renovate bot at the debug level if you can.
Use the environment variable `LOG_LEVEL=debug` to run Renovate at the debug level.
When you use `LOG_LEVEL=debug`, debug logging starts from the beginning of the app.
If you had configured debug logging in a file config, then the debug logging starts _after_ the file config is parsed.
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` only if all three statements are true:
......
......@@ -294,13 +294,6 @@ const options: RenovateOptions[] = [
admin: true,
},
// Log options
{
name: 'logLevel',
description: 'Logging level. Deprecated, use `LOG_LEVEL` environment.',
stage: 'global',
type: 'string',
allowedValues: ['fatal', 'error', 'warn', 'info', 'debug', 'trace'],
},
{
name: 'logFile',
description: 'Log file path.',
......
import { addStream, levels, logger, setContext } from '../logger';
import { addStream, logger, setContext } from '../logger';
import { get, getLanguageList, getManagerList } from '../manager';
import { ensureDir, getSubDirectory, readFile } from '../util/fs';
import { ensureTrailingSlash } from '../util/url';
......@@ -75,15 +75,6 @@ export async function parseConfigs(
delete config.privateKeyPath;
}
// Deprecated set log level: https://github.com/renovatebot/renovate/issues/8291
// istanbul ignore if
if (config.logLevel) {
logger.warn(
'Configuring logLevel in CLI or file 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
setContext(config.logContext);
......
......@@ -74,7 +74,6 @@ export interface GlobalOnlyConfig {
gitPrivateKey?: string;
logFile?: string;
logFileLevel?: LogLevel;
logLevel?: LogLevel;
prCommitsPerRunLimit?: number;
privateKeyPath?: string;
redisUrl?: string;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment