Missing standard output on Gradle 2.8 when using wrapper

When running with the daemon on Gradle 2.8, logging output is missing, which is causing the logging output from all of our plugins, and much of the Gradle logging output to be dropped on the floor. For example, with a completely empty project:

# gradlew --info
Connected to daemon DaemonInfo{pid=16749, address=[63eb3dd6-0718-462a-973f-a3dfb19756e5 port:64653, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=true, context=DefaultDaemonContext[uid=12d222f3-624f-4111-b557-d18a937fe667,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home,daemonRegistryDir=/Users/dannyt/.gradle/daemon,pid=16749,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]}. Dispatching request Build{id=bff261cc-3035-403b-87da-6ac8bee96952.1, currentDir=/private/tmp/std}.
Received result org.gradle.launcher.daemon.protocol.BuildStarted@7d322cad from daemon DaemonInfo{pid=16749, address=[63eb3dd6-0718-462a-973f-a3dfb19756e5 port:64653, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=true, context=DefaultDaemonContext[uid=12d222f3-624f-4111-b557-d18a937fe667,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home,daemonRegistryDir=/Users/dannyt/.gradle/daemon,pid=16749,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be starting).
:help

Welcome to Gradle 2.8.

To run a build, run gradlew <task> ...

To see a list of available tasks, run gradlew tasks

To see a list of command-line options, run gradlew --help

To see more detail about a task, run gradlew help --task <task>

BUILD SUCCESSFUL

Total time: 0.597 secs
Received result Success[value=null] from daemon DaemonInfo{pid=16749, address=[63eb3dd6-0718-462a-973f-a3dfb19756e5 port:64653, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=true, context=DefaultDaemonContext[uid=12d222f3-624f-4111-b557-d18a937fe667,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home,daemonRegistryDir=/Users/dannyt/.gradle/daemon,pid=16749,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).

But with --no-daemon:

#gradlew --info --no-daemon
Starting Build
Settings evaluated using settings file '/master/settings.gradle'.
Projects loaded. Root project using build file '/private/tmp/std/build.gradle'.
Included projects: [root project 'std']
Evaluating root project 'std' using build file '/private/tmp/std/build.gradle'.
All projects evaluated.
No tasks specified. Using default task 'help'
Selected primary task 'help' from project :
Tasks to be executed: [task ':help']
:help (Thread[main,5,main]) started.
:help
Executing task ':help' (up-to-date check took 0.001 secs) due to:
  Task has not declared any outputs.

Welcome to Gradle 2.8.

To run a build, run gradlew <task> ...

To see a list of available tasks, run gradlew tasks

To see a list of command-line options, run gradlew --help

To see more detail about a task, run gradlew help --task <task>
:help (Thread[main,5,main]) completed. Took 0.006 secs.

BUILD SUCCESSFUL

Total time: 2.319 secs

Odd. We’ve done some more testing, and something in the .gradle directory is causing this; it doesn’t happen when I create a new directory with just the properties file to enable the daemon… must be some weird local state.

OK. In case you ever find out the reason definitely let us know.

We think it was related to an interaction between the logging context and our metrics plugin; doesn’t seem to be a Gradle problem here.