[GRADLE-2126] Extraneous output prefix is seen on every line when output from gradlew on Unix is redirected to file Created: 26/Feb/12 Updated: 04/Jan/13 Resolved: 01/Mar/12 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 1.0-milestone-9 |
Type: | Improvement | ||
Reporter: | Gradle Forums | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Description |
When redirecting output from "gradlew" (gradle wrapper) running on Unix into a file, I'm seeing every line in the output prepended with the gradle's phase label and the task name, such as: > Building > :testOutput: When I run gradlew without redirecting output to a file, I do not see such prepending lines on the console. And when I run "gradlew" on Windows and redirect to a file, I do not see these prepending strings either. I'm running on gradle-1.0-milestone-6 version. Any suggestions on how I can make such extraneous output go away in Unix environment? Thanks! |
Comments |
Comment by Gradle Forums [ 26/Feb/12 ] |
Hmmm, I cannot reproduce it. Would you provide a sample build.gradle that can reproduce the problem? |
Comment by Gradle Forums [ 26/Feb/12 ] |
Sure, here are the contents of my build.gradle file: task testOutput { If I execute this task above without redirecting output to a file (gradlew testOutput), then the output on the console looks fine: :testOutput Hello World! BUILD SUCCESSFUL Total time: 1.622 secs However, if I redirect output to a file (by executing gradlew testOutput > out.txt), then contents of the out.txt look as follows: > Loading > Resolving dependencies 'classpath' > Resolving dependencies 'classpath' > Resolving dependencies ':classpath'> Building > :testOutput:testOutput As you can see, there are these errouneous "> Building > :testOutput" prepending strings that show up when output is redirected to a file. Is there a way to redirect to a file such that the output will have the same clean look as it looked on the console? I'm running these use cases on Unix. Thanks, |
Comment by Gradle Forums [ 26/Feb/12 ] |
Do you have some more details about your environment: which type of Unix, which JVM you are using, which shell you are using, etc? |
Comment by Gradle Forums [ 26/Feb/12 ] |
Sure, here's the environment info: And I'm using the Gradle Wrapper (gradlew). ------------------------------------------------------------ Gradle build time: Thursday, November 17, 2011 5:54:12 AM UTC Same behavior is observed in both bash and korh shells. |