Fix debug startup netty log output
Malinskiy opened this issue · 1 comments
Malinskiy commented
Is your feature request related to a problem? Please describe.
During startup adam prints a huge log:
D 01:12:08.749 [main] <i.n.u.i.logging.InternalLoggerFactory> Using SLF4J as the default logging framework
D 01:12:08.750 [main] <io.netty.util.NetUtil> -Djava.net.preferIPv4Stack: false
D 01:12:08.750 [main] <io.netty.util.NetUtil> -Djava.net.preferIPv6Addresses: false
D 01:12:08.751 [main] <io.netty.util.NetUtilInitializations> Loopback interface: lo (lo, 0:0:0:0:0:0:0:1%lo)
D 01:12:08.759 [main] <i.netty.util.internal.PlatformDependent0> -Dio.netty.noUnsafe: false
D 01:12:08.760 [main] <i.netty.util.internal.PlatformDependent0> Java version: 15
D 01:12:08.760 [main] <i.netty.util.internal.PlatformDependent0> sun.misc.Unsafe.theUnsafe: available
D 01:12:08.760 [main] <i.netty.util.internal.PlatformDependent0> sun.misc.Unsafe.copyMemory: available
D 01:12:08.760 [main] <i.netty.util.internal.PlatformDependent0> java.nio.Buffer.address: available
D 01:12:08.762 [main] <i.netty.util.internal.PlatformDependent0> direct buffer constructor: unavailable
...
Describe the solution you'd like
By default, this shouldn't happen
Malinskiy commented
Due to the complexity of slf4j logging configuration depending on the actual implemention, this will depend on the user of adam. (This makes sense because only a final user of adam knows what they want to log).
For completeness sake here is a logback classic config example for removing the debug output above:
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
<logger name="io.netty" level="error"/>
<logger name="io.vertx" level="error"/>
</configuration>