gpt4 book ai didi

gradle - 如何控制 gradle daemon 的输出

转载 作者:行者123 更新时间:2023-12-01 09:29:41 24 4
gpt4 key购买 nike

我在我的 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 秒,但这比原来的消息更烦人!如何删除原始消息或删除所有这些日志记录输出以使输出恢复正常?

最佳答案

我没有看到任何这样的输出。我已经使用属性文件方法启用了守护进程,也许这就是原因?

~/.gradle/gradle.properties:

org.gradle.daemon=true

如果你决定一个特定的执行应该忽略它,你总是可以使用 gradle --no-daemon

关于gradle - 如何控制 gradle daemon 的输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17073135/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com