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

Add CLI option `--log-level=<level>' #1658

Merged
merged 3 commits into from
Oct 12, 2022

Conversation

paul-dingemans
Copy link
Collaborator

Description

Description

Replace CLI options --debug, --trace, --verbose and -v are with --log-level=<level> or the short version `-l=.

Closes #1632

  • Allow disabling logging in CLI by setting --log-level=none or -l=none.

Closes #1652

Checklist

  • PR description added
  • tests are added
  • KtLint has been applied on source code itself and violations are fixed
  • documentation is updated
  • CHANGELOG.md is updated

In case of adding a new rule:

…with `--log-level=<level>` or the short version `-l=<level>.

Closes pinterest#1632

* Allow disabling logging in CLI by setting `--log-level=none` or `-l=none`.

Closes pinterest#1652
build.gradle Outdated
Comment on lines 37 to 42
// Experimental rules run by default run on the ktlint code base itself. Experimental rules should not be released
// if we are not pleased ourselves with the results on the ktlint code base.
'--experimental',
// Run with log-level error so that all lint violations can be spotted easily and are not drowned in a lot of log
// lines.
'--log-level=error'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this change needs to resolve conflicts with 28ff448, should add a trailing comma after '--log-level=error'.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I noted that as well when I was reviewing the code. Tnx for notifying it as well.

# Conflicts:
#	CHANGELOG.md
#	build.gradle
#	ktlint-ruleset-template/build.gradle.kts
@paul-dingemans paul-dingemans merged commit c9c86f4 into pinterest:master Oct 12, 2022
@paul-dingemans paul-dingemans deleted the 1632-set-log-level branch December 17, 2022 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logging output is sent to stdout instead of stderr when using --stdin Set log level as (CLI) parameter
2 participants