Details
-
Type:
Improvement
-
Status:
Resolved
-
Resolution: Fixed
-
Affects Version/s: 0.9
-
Fix Version/s: 0.9-rc-1
Description
There's a missing newline character between the current task name and the text written to stderr.
Still reproducible in version 1.0. New lines appear correct in the terminal, but do not work when redirecting.
Here's sample output:
$ gradle build 2>&1 | tee gradle.out ... :logformat:compileJava/home/rodion/workspace/logstx/logformat/src/main/java/com/logstorage/logformat/dag/LogformatConverter.java:92: warning: [unchecked] unchecked cast for (Element e2 : ((List<Element>) e.getChildren("action"))) { ^ required: List<Element> found: List ...The above output appears in the console (piped through tee) and in the resulting gradle.out file, in identical manner.
This has an unfortunate effect on Gradle-based plugins (e.g. Jenkins, see JENKINS-12234 for a screenshot).
Gradle -version output:
$ gradle build 2>&1 | tee gradle.out ... :logformat:compileJava/home/rodion/workspace/logstx/logformat/src/main/java/com/logstorage/logformat/dag/LogformatConverter.java:92: warning: [unchecked] unchecked cast for (Element e2 : ((List<Element>) e.getChildren("action"))) { ^ required: List<Element> found: List ...