refactor: 修改日志输出
This commit is contained in:
@@ -94,12 +94,12 @@ public final class BallDebugListener extends BallListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onServerOffline(@NotNull ServerOfflineEvent event) {
|
public void onServerOffline(@NotNull ServerOfflineEvent event) {
|
||||||
BallAPI.getInstance().getLogger().info("ServerOfflineEvent: " + event.getServerID());
|
BallAPI.getInstance().getLogger().info("服务器已离线: " + event.getServerID());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onServerOnline(@NotNull ServerOnlineEvent event) {
|
public void onServerOnline(@NotNull ServerOnlineEvent event) {
|
||||||
BallAPI.getInstance().getLogger().info("ServerOnlineEvent: " + event.getServerInfo().getId());
|
BallAPI.getInstance().getLogger().info("服务器已上线: " + event.getServerInfo().getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -35,7 +35,7 @@ public class BallChannelInitializer extends ChannelInitializer<NioSocketChannel>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initChannel(@NotNull NioSocketChannel channel) {
|
protected void initChannel(@NotNull NioSocketChannel channel) {
|
||||||
LOGGER.info("远程地址 {} 请求建立连接...", channel.remoteAddress().toString());
|
LOGGER.info("远程地址 {} 请求建立连接.", channel.remoteAddress().toString());
|
||||||
|
|
||||||
String hostAddress = channel.remoteAddress().getAddress().getHostAddress();
|
String hostAddress = channel.remoteAddress().getAddress().getHostAddress();
|
||||||
if (ServerConfig.isEnableAcceptList() && !ServerConfig.getAcceptList().contains(hostAddress)) {
|
if (ServerConfig.isEnableAcceptList() && !ServerConfig.getAcceptList().contains(hostAddress)) {
|
||||||
|
Reference in New Issue
Block a user