How can I disable all logs Netty 4 does with log4j? I actually want to write all logs by myself and see only in logs only what I wrote there. I'm new to both Netty and log4j.
How can I disable all logs Netty 4 does with log4j? I actually want to write all logs by myself and see only in logs only what I wrote there. I'm new to both Netty and log4j.
The answer by @DWand did not work for me, but something similar did work in the case of Hibernate:
Logger.getLogger("org.hibernate").setLevel(...)
For Netty, I simply used a class-based config, and set a name filter to the log handler along with some other conditions:
handler.setFilter(record -> !record.getLoggerName().startsWith("io.netty"))
I am not sure if this is a good way to do it, but this was the only way I could skip only Netty logs.