1

我的项目中有一些测试,当我通过 IntelliJ 运行它们时,我从 WELD 中获得了许多行日志记录语句。我不知道如何禁用它们或将它们设置为 WARNING 或更高级别。

这是我每次在 intelliJ 中运行测试类时的当前输出(附图):

18:25:31.951 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
18:25:31.980 [main] INFO org.jboss.weld.Version - WELD-000900: 2.4.7 (Final)
18:25:32.053 [main] DEBUG org.jboss.weld.Bootstrap - WELD-ENV-000030: Cannot load class using the ResourceLoader: org.jboss.jandex.Index
18:25:32.242 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.266 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.293 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.313 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.329 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.341 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.375 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.390 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.402 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.414 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.425 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.438 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.449 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.460 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.470 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.489 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.501 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.512 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.522 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...
18:25:32.532 [main] DEBUG org.jboss.weld.environment.deployment.discovery.DefaultBeanArchiveScanner - Resolved bean archive reference: ...

IntelliJ 截图

预期结果:

仅显示 WARN 或 ERROR 或更高级别的消息或完全禁用 Weld Container 和 Context 实例化的日志记录语句。

有没有办法将weld-se 日志配置为禁用或仅显示警告或错误日志语句?

4

0 回答 0