Skip to content
New issue

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

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

Already on GitHub? # to your account

Set log level as (CLI) parameter #1632

Closed
paul-dingemans opened this issue Sep 3, 2022 · 1 comment · Fixed by #1658
Closed

Set log level as (CLI) parameter #1632

paul-dingemans opened this issue Sep 3, 2022 · 1 comment · Fixed by #1658
Milestone

Comments

@paul-dingemans
Copy link
Collaborator

Add new CLI flag --log-level=<level> and remove flags --debug, --trace and --verbose. The new flag can be sued to set the log level to any of the used log levels. In addition to current situation, this makes it also possible to suppress warning and/or errors on. As of that users can more easily control the amount of logging produced by ktlint.

Possible downside is that --log-level=debug is more cumbersome to specify than --debug or -v.

Originally posted by @paul-dingemans in #1624 (comment)

@paul-dingemans
Copy link
Collaborator Author

Also allow for option --log-level=none to suppress all logging to accomodate for issue #1652.

paul-dingemans added a commit to paul-dingemans/ktlint that referenced this issue Sep 23, 2022
…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
paul-dingemans added a commit that referenced this issue Oct 12, 2022
…with `--log-level=<level>` or the short version `-l=<level>. (#1658)

Closes #1652
Closes #1632
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant