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

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
Assignees
Milestone

Comments

@romani
Copy link
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.

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 pushed a commit that referenced this issue May 27, 2016
@romani romani added this to the 6.19 milestone May 27, 2016
@romani
Copy link
Member Author

romani commented May 27, 2016

fix is merged.

@romani romani closed this as completed May 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants