Skip Debug Logs during script processing / dependency resolution?

We have a gradle build with more than 100 projects in it. When running gradle in debug mode, it significantly slows down the build because of the raw amount of debug logs on the ‘parsing build script’ part of the build.

I find that quite often I need to turn on debug logging to get some more information about a task that is running (for example, a failing exec task I want the command line + args, which you get when debug is on).

Is there any way to turn debug logs on only for task execution (and leave them off for build script parsing/task initialization?)

You could do this, but it doesn’t work with the daemon.

tasks.all {
   logging.level = LogLevel.DEBUG