mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FIX] Возможность выбора уровня логгирования Netty
This commit is contained in:
parent
72ce4234a3
commit
02c8ee4999
2 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
package ru.gravit.launchserver;
|
package ru.gravit.launchserver;
|
||||||
|
|
||||||
|
import io.netty.handler.logging.LogLevel;
|
||||||
import ru.gravit.launcher.Launcher;
|
import ru.gravit.launcher.Launcher;
|
||||||
import ru.gravit.launcher.LauncherConfig;
|
import ru.gravit.launcher.LauncherConfig;
|
||||||
import ru.gravit.launcher.NeedGarbageCollection;
|
import ru.gravit.launcher.NeedGarbageCollection;
|
||||||
|
@ -280,6 +281,7 @@ public class NettyConfig {
|
||||||
public Map<String, String> bindings = new HashMap<>();
|
public Map<String, String> bindings = new HashMap<>();
|
||||||
public NettyPerformanceConfig performance;
|
public NettyPerformanceConfig performance;
|
||||||
public NettyBindAddress[] binds;
|
public NettyBindAddress[] binds;
|
||||||
|
public LogLevel logLevel = LogLevel.DEBUG;
|
||||||
}
|
}
|
||||||
public class NettyPerformanceConfig
|
public class NettyPerformanceConfig
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,7 +32,7 @@ public LauncherNettyServer() {
|
||||||
serverBootstrap = new ServerBootstrap();
|
serverBootstrap = new ServerBootstrap();
|
||||||
serverBootstrap.group(bossGroup, workerGroup)
|
serverBootstrap.group(bossGroup, workerGroup)
|
||||||
.channel(NioServerSocketChannel.class)
|
.channel(NioServerSocketChannel.class)
|
||||||
.handler(new LoggingHandler(LogLevel.DEBUG))
|
.handler(new LoggingHandler(config.logLevel))
|
||||||
.childHandler(new ChannelInitializer<NioSocketChannel>() {
|
.childHandler(new ChannelInitializer<NioSocketChannel>() {
|
||||||
@Override
|
@Override
|
||||||
public void initChannel(NioSocketChannel ch) {
|
public void initChannel(NioSocketChannel ch) {
|
||||||
|
|
Loading…
Reference in a new issue