Can gradle's log output buffering be forced to flush old log data?

We’re hitting a problem where the gradle output is not being flushed often enough. Something in our build is hanging up, but the last log messages are from an earlier step in the task.

It seems to be buffered at around 4K, or about 25 lines. This makes up to the last 24 lines of log output not visible if a process hangs.

Is it possible to force a flush after a timeout in addition to a buffer full?

If not, what’s the recommended way to override this buffering behavior?

In which environment are you running the build? This may not be a problem on Gradle’s side.

------------------------------------------------------------ Gradle 1.11 ------------------------------------------------------------

Build time:

2014-02-11 11:34:39 UTC Build number: none Revision:

a831fa866d46cbee94e61a09af15f9dd95987421

Groovy:

1.8.6 Ant:

Apache Ant™ version 1.9.2 compiled on July 8 2013 Ivy:

2.2.0 JVM:

1.7.0_60 (Oracle Corporation 24.60-b09) OS:

Linux 3.11.0-23-generic amd64

------------------------------------------------------------ Gradle 1.11 ------------------------------------------------------------

Build time:

2014-02-11 11:34:39 UTC Build number: none Revision:

a831fa866d46cbee94e61a09af15f9dd95987421

Groovy:

1.8.6 Ant:

Apache Ant™ version 1.9.2 compiled on July 8 2013 Ivy:

2.2.0 JVM:

1.7.0_55 (Oracle Corporation 24.55-b03) OS:

Linux 3.11.0-18-generic amd64

So you are running the build interactively from the command line?

I think I see what you’re getting at. It’s run from a slurm batch processor. This may be doing it’s own buffering.

thanks again Peter.