StaticLog rename to LogUtil

This commit is contained in:
Looly
2023-05-15 20:03:12 +08:00
parent d0556a4e48
commit 4670f21a8c
22 changed files with 98 additions and 56 deletions

View File

@@ -16,7 +16,7 @@ import java.nio.ByteBuffer;
import java.nio.channels.AsynchronousSocketChannel;
import java.nio.channels.CompletionHandler;
import org.dromara.hutool.log.StaticLog;
import org.dromara.hutool.log.LogUtil;
/**
* 接入完成回调,单例使用
@@ -43,7 +43,7 @@ public class AcceptHandler implements CompletionHandler<AsynchronousSocketChanne
@Override
public void failed(final Throwable exc, final AioServer aioServer) {
StaticLog.error(exc);
LogUtil.error(exc);
}
}

View File

@@ -14,7 +14,7 @@ package org.dromara.hutool.socket.aio;
import java.nio.ByteBuffer;
import org.dromara.hutool.log.StaticLog;
import org.dromara.hutool.log.LogUtil;
/**
* 简易IO信息处理类<br>
@@ -31,6 +31,6 @@ public abstract class SimpleIoAction implements IoAction<ByteBuffer> {
@Override
public void failed(final Throwable exc, final AioSession session) {
StaticLog.error(exc);
LogUtil.error(exc);
}
}

View File

@@ -13,7 +13,7 @@
package org.dromara.hutool.socket.nio;
import org.dromara.hutool.core.io.IORuntimeException;
import org.dromara.hutool.log.StaticLog;
import org.dromara.hutool.log.LogUtil;
import java.io.IOException;
import java.nio.channels.CompletionHandler;
@@ -33,7 +33,7 @@ public class AcceptHandler implements CompletionHandler<ServerSocketChannel, Nio
try {
// 获取连接到此服务器的客户端通道
socketChannel = serverSocketChannel.accept();
StaticLog.debug("Client [{}] accepted.", socketChannel.getRemoteAddress());
LogUtil.debug("Client [{}] accepted.", socketChannel.getRemoteAddress());
} catch (final IOException e) {
throw new IORuntimeException(e);
}
@@ -44,7 +44,7 @@ public class AcceptHandler implements CompletionHandler<ServerSocketChannel, Nio
@Override
public void failed(final Throwable exc, final NioServer nioServer) {
StaticLog.error(exc);
LogUtil.error(exc);
}
}

View File

@@ -4,7 +4,7 @@ import org.dromara.hutool.core.date.DateUtil;
import org.dromara.hutool.core.io.buffer.BufferUtil;
import org.dromara.hutool.core.lang.Console;
import org.dromara.hutool.core.text.StrUtil;
import org.dromara.hutool.log.StaticLog;
import org.dromara.hutool.log.LogUtil;
import java.nio.ByteBuffer;
@@ -17,7 +17,7 @@ public class AioServerTest {
@Override
public void accept(final AioSession session) {
StaticLog.debug("【客户端】:{} 连接。", session.getRemoteAddress());
LogUtil.debug("【客户端】:{} 连接。", session.getRemoteAddress());
session.write(BufferUtil.ofUtf8("=== Welcome to Hutool socket server. ==="));
}