[FIX] Возможность выбора уровня логгирования Netty

This commit is contained in:
Gravit 2019-04-29 15:59:30 +07:00
parent 72ce4234a3
commit 02c8ee4999
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
2 changed files with 3 additions and 1 deletions

View file

@ -1,5 +1,6 @@
package ru.gravit.launchserver;
import io.netty.handler.logging.LogLevel;
import ru.gravit.launcher.Launcher;
import ru.gravit.launcher.LauncherConfig;
import ru.gravit.launcher.NeedGarbageCollection;
@ -280,6 +281,7 @@ public class NettyConfig {
public Map<String, String> bindings = new HashMap<>();
public NettyPerformanceConfig performance;
public NettyBindAddress[] binds;
public LogLevel logLevel = LogLevel.DEBUG;
}
public class NettyPerformanceConfig
{

View file

@ -32,7 +32,7 @@ public LauncherNettyServer() {
serverBootstrap = new ServerBootstrap();
serverBootstrap.group(bossGroup, workerGroup)
.channel(NioServerSocketChannel.class)
.handler(new LoggingHandler(LogLevel.DEBUG))
.handler(new LoggingHandler(config.logLevel))
.childHandler(new ChannelInitializer<NioSocketChannel>() {
@Override
public void initChannel(NioSocketChannel ch) {