日志补充

This commit is contained in:
zhangzc
2018-07-05 21:32:00 +08:00
parent 8a7ee2827b
commit c875cae0fd
2 changed files with 2 additions and 1 deletions

View File

@@ -69,7 +69,6 @@
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version> <version>${slf4j.version}</version>
<scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<distributionManagement> <distributionManagement>

View File

@@ -40,6 +40,7 @@ public class ZzcServer {
private EventLoopGroup workerGroup; private EventLoopGroup workerGroup;
private void init(){ private void init(){
logger.info("zzcserver初始化......");
bossGroup = new NioEventLoopGroup(bossGroupThread, new ThreadFactory() { bossGroup = new NioEventLoopGroup(bossGroupThread, new ThreadFactory() {
private AtomicInteger threadIndex = new AtomicInteger(0); private AtomicInteger threadIndex = new AtomicInteger(0);
@Override @Override
@@ -75,6 +76,7 @@ public class ZzcServer {
public void startServer(){ public void startServer(){
init(); init();
try { try {
logger.info("zzcserver启动......监听端口:{}",listenPort);
ServerBootstrap b = new ServerBootstrap(); // (2) ServerBootstrap b = new ServerBootstrap(); // (2)
b.group(bossGroup, workerGroup) b.group(bossGroup, workerGroup)
.channel(useEpoll() ? EpollServerSocketChannel.class:NioServerSocketChannel.class) // (3) .channel(useEpoll() ? EpollServerSocketChannel.class:NioServerSocketChannel.class) // (3)