You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following applies to running ktlint+diktat in comand line:
ktlint executalbe jar bundles logback, but doesn't have any config file. Ktlint sets logging level programmatically, but only for a particular logger, that is used in KtLintCommandLine.kt. If neither of --debug, --trace, --verbose flags is present, it sets logback's level to INFO.
However, diktat uses multiple Slf4j loggers. Since no custom config for logback is present, the BasicConfiguratoris used and logging level is set to DEBUG. This leads to several debug messages always showing up, see saveourtool/save-cli#401 (comment).
We should include a logback.xml into diktat-ruleset for setting default level to INFO, or try to find a way to share logging level with ktlint.
The text was updated successfully, but these errors were encountered:
petertrr
changed the title
Inconsistency between ktlint and diktat in logging level
Inconsistency between ktlint and diktat in logging level when run from command line
Jun 22, 2022
### What's done:
* Initialize loggers using kotlin-logging and extension from ktlint-core
This pull request closes#1413. Full description of the problem is in #1394
The following applies to running ktlint+diktat in comand line:
ktlint executalbe jar bundles logback, but doesn't have any config file. Ktlint sets logging level programmatically, but only for a particular logger, that is used in
KtLintCommandLine.kt
. If neither of--debug
,--trace
,--verbose
flags is present, it sets logback's level toINFO
.However, diktat uses multiple Slf4j loggers. Since no custom config for logback is present, the
BasicConfigurator
is used and logging level is set toDEBUG
. This leads to several debug messages always showing up, see saveourtool/save-cli#401 (comment).We should include a
logback.xml
intodiktat-ruleset
for setting default level to INFO, or try to find a way to share logging level with ktlint.The text was updated successfully, but these errors were encountered: