gpt4 book ai didi

maven输出大量 "FINE"日志消息,我该如何阻止它?

转载 作者:行者123 更新时间:2023-12-02 19:55:54 26 4
gpt4 key购买 nike

当我运行 Maven 时,我得到的输出就好像我指定了日志记录级别 FINE 一样,这使得很难找到实际的输出。我还得到了数百行列出显式和隐式绑定(bind)的信息。据我所知我根本没有配置 mvn 。我正在 cygwin shell 中运行。

这是一个示例,还提供了有关我的版本等的信息。

$ mvn --show-version
Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven home: C:\apache-maven-3.0.4
Java version: 1.6.0_31, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_31\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Module execution: 344ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: TypeListeners & ProvisionListener creation: 6ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Scopes creation: 4ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Converters creation: 1ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Binding creation: 23ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Private environment creation: 1ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Injector construction: 0ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Binding initialization: 20ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Binding indexing: 1ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Collecting injection requests: 0ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Binding validation: 1ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Static validation: 0ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Instance member validation: 5ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Provider verification: 2ms
Jan 23, 2013 3:33:03 PM com.google.inject.internal.util.Stopwatch resetAndLog
FINE: Static member injection: 0ms
Jan 23, 2013 3:33:03 PM org.sonatype.guice.bean.reflect.Logs$JULSink debug
FINE: Add publisher: com.google.inject.internal.InjectorImpl@561777b1

-----[explicit bindings]-------------------------------------------------------
0. ProviderInstanceBinding{key=Key[type=com.google.inject.Injector, annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE, provider=Provider<Injector>}
1. ProviderInstanceBinding{key=Key[type=java.util.logging.Logger, annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE, provider=Provider<Logger>}
2. InstanceBinding{key=Key[type=com.google.inject.Stage, annotation=[none]], source=[unknown source], instance=DEVELOPMENT}
.
.
.
194. ConstructorBinding{key=Key[type=org.apache.maven.lifecycle.internal.ThreadConfigurationService, annotation=[none]], source=ClassRealm[plexus.core, parent: null], scope=Scopes.SINGLETON}
195. ConstructorBinding{key=Key[type=org.apache.maven.lifecycle.internal.MojoExecutor, annotation=[none]], source=ClassRealm[plexus.core, parent: null], scope=Scopes.SINGLETON}
196. ConstructorBinding{key=Key[type=org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder, annotation=[none]], source=ClassRealm[plexus.core, parent: null], scope=Scopes.SINGLETON}
197. ConstructorBinding{key=Key[type=org.apache.maven.lifecycle.Lifecycle, annotation=[none]], source=ClassRealm[plexus.core, parent: null], scope=Scopes.SINGLETON}

最佳答案

它看起来更像是日志输出,而不是 Maven 生成的任何内容。查看Stopwatch class的源代码,它使用 Java Util Logging。您是否已设置默认日志记录属性以包括输出的 FINE 级别?这可能位于 JAVA_HOME 本身中。

但是,这更多的是您配置日志记录的方式,而不是 Maven 所做的任何事情

关于maven输出大量 "FINE"日志消息,我该如何阻止它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14489025/

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