new CLI argument: provide abililty to show debug level of logs from checkstyle code #3086

Closed
romani opened this Issue Apr 8, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@romani
Member

romani commented Apr 8, 2016

base on discussion at #3085 and a lot of other cases that were before.

We should have some way to "trace" what is going on in Checkstyle by directing logs to output.
New CLI argument need to be created "-d" "--debug" to show DEBUG level of logs.
All logging in Checkstyle should be done on with DEBUG and TRACE level. INFO and WARN and ERROR already user for severity so lets not mix them.

for now we use apache logging (example), dependency is transitive:

$ mvn dependency:tree | grep -B 4 logging
[INFO] com.puppycrawl.tools:checkstyle:jar:6.18-SNAPSHOT
[INFO] +- antlr:antlr:jar:2.7.7:compile
[INFO] +- org.antlr:antlr4-runtime:jar:4.5.3:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO] |  +- commons-logging:commons-logging:jar:1.1.1:compile

I personally fan of slf4j logging api usage. But switching to slf4j will mean extra dependency to our library. For now we have almost no logging. So for now lets stay with apache common logging till amount of logs become significant and verbose format

if (log.isDebugEnabled()) {
 log.debug(".....")
}

is bearable. But all log usages should be wrapped for now, as we are a library.

@romani romani added the approved label Apr 16, 2016

rnveach added a commit to rnveach/checkstyle that referenced this issue May 15, 2016

rnveach added a commit to rnveach/checkstyle that referenced this issue May 20, 2016

rnveach added a commit to rnveach/checkstyle that referenced this issue May 20, 2016

rnveach added a commit to rnveach/checkstyle that referenced this issue May 22, 2016

rnveach added a commit to rnveach/checkstyle that referenced this issue May 27, 2016

romani added a commit that referenced this issue May 27, 2016

@romani romani added the new feature label May 27, 2016

@romani romani added this to the 6.19 milestone May 27, 2016

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani May 27, 2016

Member

fix is merged.

Member

romani commented May 27, 2016

fix is merged.

@romani romani closed this May 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment