maven-checkstyle-plugin
maven-checkstyle-plugin copied to clipboard
[MCHECKSTYLE-408] - Ensure Checkstyle console logs are properly formatted
When the check
goal is run, the following is output:
[INFO] --- checkstyle:check (default-cli) @ project ---
[INFO] Starting audit...
Audit done.
At first glance, it appears as the Audit done
message is not from a logger, and this was how the issue was described in MCHECKSTYLE-408.
Further investigation shows that actually, all logging events are written to stringOutputStream
, resulting in this:
Starting audit... Audit done.
And at the end, this is logged as a single, multi-line log message.
Changes:
- Replace
stringOutputStream
/defaultLogger
with a new data structure (CheckstyleExecutorRequest
) - Log the messages as they are produced, rather than in a batch at the end
New output:
[INFO] --- checkstyle:check (default-cli) @ project ---
[INFO] Starting audit...
[INFO] Audit done.
- [x] I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004