【问题标题】:netty.io java disable debug messages [duplicate]netty.io java禁用调试消息[重复]
【发布时间】:2020-06-21 04:15:38
【问题描述】:

所以我用 netty 创建了一个应用程序,它工作正常,但它给我的调试消息如下所示:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.PlatformDependent0 
(file:/C:/Users/******/.m2/repository/io/netty/netty-all/5.0.0.Alpha2/netty-all-5.0.0.Alpha2.jar) to 
field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of 
io.netty.util.internal.PlatformDependent0
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Juni 20, 2020 9:42:21 NACHM. io.netty.util.internal.PlatformDependent <clinit>
INFORMATION: Your platform does not provide complete low-level API for accessing direct buffers 
reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system 
unstability.

我在 5.0.0.Alpha2 版本上使用 netty-all,我只想禁用这些消息。

【问题讨论】:

标签: java netty


【解决方案1】:

我发现 Logger.getLogger("io.netty").setLevel(Level.OFF); 可以解决问题并禁用调试/日志消息。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-11
    • 2022-01-06
    • 1970-01-01
    • 2011-07-15
    • 2012-09-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多