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


#1

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?


(Peter Niederwieser) #2

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


#3

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


#4

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


(Peter Niederwieser) #5

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


#6

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.