我在我的 gradle 构建中设置 jvm args,它给了我这个有点烦人的消息:
Note: in order to honour the org.gradle.jvmargs and/or org.gradle.java.home values specified for this build, it is necessary to fork a new JVM.
To avoid the slowdown associated with this extra process, you might want to consider running Gradle with the daemon enabled.
Please see the user guide chapter on the daemon at /Users/gus/tools/gradle-1.4/docs/userguide/gradle_daemon.html.
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
所以想让消息消失,我试过了gradle --daemon
。然后我被一大堆看起来像这样的垃圾邮件击中:(小节选)
14:33:35.248 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Build
14:33:35.287 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.launcher.daemon.protocol.BuildStarted
14:33:35.298 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressStartEvent
14:33:35.316 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressStartEvent
14:33:35.319 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressCompleteEvent
14:33:35.321 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressStartEvent
14:33:35.322 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressCompleteEvent
14:33:35.444 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressCompleteEvent
14:33:35.446 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressStartEvent
14:33:35.447 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressStartEvent
14:33:35.444 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :compileJava
14:33:35.479 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressStartEvent
14:33:35.649 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressCompleteEvent
14:33:35.728 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressCompleteEvent
14:33:35.727 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :compileJava UP-TO-DATE
14:33:35.731 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressStartEvent
14:33:35.727 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :processResources
14:33:35.736 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressCompleteEvent
14:33:35.735 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :processResources UP-TO-DATE
14:33:35.739 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: received class org.gradle.logging.internal.ProgressStartEvent
14:33:35.736 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :classes
它快了大约 3 秒,但这比原来的消息更烦人!如何摆脱原始消息或摆脱所有这些日志输出以使输出恢复正常?