Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove logLevel support in config #9390

Merged
merged 2 commits into from Apr 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 0 additions & 12 deletions docs/usage/self-hosted-configuration.md
Expand Up @@ -225,18 +225,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:
Expand Down
7 changes: 0 additions & 7 deletions lib/config/definitions.ts
Expand Up @@ -275,13 +275,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.',
Expand Down
11 changes: 1 addition & 10 deletions lib/config/index.ts
@@ -1,4 +1,4 @@
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';
Expand Down Expand Up @@ -84,15 +84,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);
Expand Down
1 change: 0 additions & 1 deletion lib/config/types.ts
Expand Up @@ -74,7 +74,6 @@ export interface GlobalOnlyConfig {
gitPrivateKey?: string;
logFile?: string;
logFileLevel?: LogLevel;
logLevel?: LogLevel;
prCommitsPerRunLimit?: number;
privateKeyPath?: string;
redisUrl?: string;
Expand Down