diff --git a/pom.xml b/pom.xml
index 7d377625c86f48c729c33791f054423065c1c0ad..6331937d62374f0fdc68da97c4679668a6cd9f12 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,6 +46,7 @@
2.6
1.2
2.12.0
+ 3.4.2
2.7.3
1.2.70
20.0
@@ -126,6 +127,12 @@
${log4j.version}
+
+ com.lmax
+ disruptor
+ ${disruptor.version}
+
+
com.alibaba
fastjson
diff --git a/whatsmars-rpc/pom.xml b/whatsmars-rpc/pom.xml
index c0844884b2ba664a31f5cf55571091b9f756935d..28709adc00007e0a85c6c1d43e80d1d4a3cea8d9 100644
--- a/whatsmars-rpc/pom.xml
+++ b/whatsmars-rpc/pom.xml
@@ -17,7 +17,6 @@
whatsmars-remoting
whatsmars-serialization
- whatsmars-logging
whatsmars-netty
diff --git a/whatsmars-rpc/whatsmars-logging/pom.xml b/whatsmars-rpc/whatsmars-logging/pom.xml
deleted file mode 100644
index 751ff3d0ff74c2ecbb67e277eba258a9762c701a..0000000000000000000000000000000000000000
--- a/whatsmars-rpc/whatsmars-logging/pom.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
- whatsmars-rpc
- org.hongxi
- Rocket.S9
-
- 4.0.0
-
- whatsmars-logging
- jar
- ${project.artifactId}
- logging for RPC
-
-
-
- org.slf4j
- slf4j-api
- true
-
-
- ch.qos.logback
- logback-classic
- test
-
-
-
-
-
\ No newline at end of file
diff --git a/whatsmars-rpc/whatsmars-logging/src/main/java/org/hongxi/whatsmars/common/logging/InnerLoggerFactory.java b/whatsmars-rpc/whatsmars-logging/src/main/java/org/hongxi/whatsmars/common/logging/InnerLoggerFactory.java
deleted file mode 100644
index 4e73289b8f882c0fb7a26bcf0a711bd516a0793c..0000000000000000000000000000000000000000
--- a/whatsmars-rpc/whatsmars-logging/src/main/java/org/hongxi/whatsmars/common/logging/InnerLoggerFactory.java
+++ /dev/null
@@ -1,482 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.hongxi.whatsmars.common.logging;
-
-import org.hongxi.whatsmars.common.logging.inner.Logger;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class InnerLoggerFactory extends InternalLoggerFactory {
-
- public InnerLoggerFactory() {
- doRegister();
- }
-
- @Override
- protected InternalLogger getLoggerInstance(String name) {
- return new InnerLogger(name);
- }
-
- @Override
- protected String getLoggerType() {
- return LOGGER_INNER;
- }
-
- @Override
- protected void shutdown() {
- Logger.getRepository().shutdown();
- }
-
- public static class InnerLogger implements InternalLogger {
-
- private Logger logger;
-
- public InnerLogger(String name) {
- logger = Logger.getLogger(name);
- }
-
- @Override
- public String getName() {
- return logger.getName();
- }
-
- @Override
- public void debug(String var1) {
- logger.debug(var1);
- }
-
- @Override
- public void debug(String var1, Throwable var2) {
- logger.debug(var1, var2);
- }
-
- @Override
- public void info(String var1) {
- logger.info(var1);
- }
-
- @Override
- public void info(String var1, Throwable var2) {
- logger.info(var1, var2);
- }
-
- @Override
- public void warn(String var1) {
- logger.warn(var1);
- }
-
- @Override
- public void warn(String var1, Throwable var2) {
- logger.warn(var1, var2);
- }
-
- @Override
- public void error(String var1) {
- logger.error(var1);
- }
-
- @Override
- public void error(String var1, Throwable var2) {
- logger.error(var1, var2);
- }
-
- @Override
- public void debug(String var1, Object var2) {
- FormattingTuple format = MessageFormatter.format(var1, var2);
- logger.debug(format.getMessage(), format.getThrowable());
- }
-
- @Override
- public void debug(String var1, Object var2, Object var3) {
- FormattingTuple format = MessageFormatter.format(var1, var2, var3);
- logger.debug(format.getMessage(), format.getThrowable());
- }
-
- @Override
- public void debug(String var1, Object... var2) {
- FormattingTuple format = MessageFormatter.arrayFormat(var1, var2);
- logger.debug(format.getMessage(), format.getThrowable());
- }
-
- @Override
- public void info(String var1, Object var2) {
- FormattingTuple format = MessageFormatter.format(var1, var2);
- logger.info(format.getMessage(), format.getThrowable());
- }
-
- @Override
- public void info(String var1, Object var2, Object var3) {
- FormattingTuple format = MessageFormatter.format(var1, var2, var3);
- logger.info(format.getMessage(), format.getThrowable());
- }
-
- @Override
- public void info(String var1, Object... var2) {
- FormattingTuple format = MessageFormatter.arrayFormat(var1, var2);
- logger.info(format.getMessage(), format.getThrowable());
- }
-
- @Override
- public void warn(String var1, Object var2) {
- FormattingTuple format = MessageFormatter.format(var1, var2);
- logger.warn(format.getMessage(), format.getThrowable());
- }
-
- @Override
- public void warn(String var1, Object... var2) {
- FormattingTuple format = MessageFormatter.arrayFormat(var1, var2);
- logger.warn(format.getMessage(), format.getThrowable());
- }
-
- @Override
- public void warn(String var1, Object var2, Object var3) {
- FormattingTuple format = MessageFormatter.format(var1, var2, var3);
- logger.warn(format.getMessage(), format.getThrowable());
- }
-
- @Override
- public void error(String var1, Object var2) {
- FormattingTuple format = MessageFormatter.format(var1, var2);
- logger.warn(format.getMessage(), format.getThrowable());
- }
-
- @Override
- public void error(String var1, Object var2, Object var3) {
- FormattingTuple format = MessageFormatter.format(var1, var2, var3);
- logger.warn(format.getMessage(), format.getThrowable());
- }
-
- @Override
- public void error(String var1, Object... var2) {
- FormattingTuple format = MessageFormatter.arrayFormat(var1, var2);
- logger.warn(format.getMessage(), format.getThrowable());
- }
-
- public Logger getLogger() {
- return logger;
- }
- }
-
-
- public static class FormattingTuple {
- private String message;
- private Throwable throwable;
- private Object[] argArray;
-
- public FormattingTuple(String message) {
- this(message, null, null);
- }
-
- public FormattingTuple(String message, Object[] argArray, Throwable throwable) {
- this.message = message;
- this.throwable = throwable;
- if (throwable == null) {
- this.argArray = argArray;
- } else {
- this.argArray = trimmedCopy(argArray);
- }
-
- }
-
- static Object[] trimmedCopy(Object[] argArray) {
- if (argArray != null && argArray.length != 0) {
- int trimemdLen = argArray.length - 1;
- Object[] trimmed = new Object[trimemdLen];
- System.arraycopy(argArray, 0, trimmed, 0, trimemdLen);
- return trimmed;
- } else {
- throw new IllegalStateException("non-sensical empty or null argument array");
- }
- }
-
- public String getMessage() {
- return this.message;
- }
-
- public Object[] getArgArray() {
- return this.argArray;
- }
-
- public Throwable getThrowable() {
- return this.throwable;
- }
- }
-
- public static class MessageFormatter {
-
- public MessageFormatter() {
- }
-
- public static FormattingTuple format(String messagePattern, Object arg) {
- return arrayFormat(messagePattern, new Object[]{arg});
- }
-
- public static FormattingTuple format(String messagePattern, Object arg1, Object arg2) {
- return arrayFormat(messagePattern, new Object[]{arg1, arg2});
- }
-
- static Throwable getThrowableCandidate(Object[] argArray) {
- if (argArray != null && argArray.length != 0) {
- Object lastEntry = argArray[argArray.length - 1];
- return lastEntry instanceof Throwable ? (Throwable) lastEntry : null;
- } else {
- return null;
- }
- }
-
- public static FormattingTuple arrayFormat(String messagePattern, Object[] argArray) {
- Throwable throwableCandidate = getThrowableCandidate(argArray);
- if (messagePattern == null) {
- return new FormattingTuple(null, argArray, throwableCandidate);
- } else if (argArray == null) {
- return new FormattingTuple(messagePattern);
- } else {
- int i = 0;
- StringBuilder sbuf = new StringBuilder(messagePattern.length() + 50);
-
- int len;
- for (len = 0; len < argArray.length; ++len) {
- int j = messagePattern.indexOf("{}", i);
- if (j == -1) {
- if (i == 0) {
- return new FormattingTuple(messagePattern, argArray, throwableCandidate);
- }
-
- sbuf.append(messagePattern.substring(i, messagePattern.length()));
- return new FormattingTuple(sbuf.toString(), argArray, throwableCandidate);
- }
-
- if (isEscapeDelimeter(messagePattern, j)) {
- if (!isDoubleEscaped(messagePattern, j)) {
- --len;
- sbuf.append(messagePattern.substring(i, j - 1));
- sbuf.append('{');
- i = j + 1;
- } else {
- sbuf.append(messagePattern.substring(i, j - 1));
- deeplyAppendParameter(sbuf, argArray[len], null);
- i = j + 2;
- }
- } else {
- sbuf.append(messagePattern.substring(i, j));
- deeplyAppendParameter(sbuf, argArray[len], null);
- i = j + 2;
- }
- }
-
- sbuf.append(messagePattern.substring(i, messagePattern.length()));
- if (len < argArray.length - 1) {
- return new FormattingTuple(sbuf.toString(), argArray, throwableCandidate);
- } else {
- return new FormattingTuple(sbuf.toString(), argArray, null);
- }
- }
- }
-
- static boolean isEscapeDelimeter(String messagePattern, int delimeterStartIndex) {
- if (delimeterStartIndex == 0) {
- return false;
- } else {
- char potentialEscape = messagePattern.charAt(delimeterStartIndex - 1);
- return potentialEscape == 92;
- }
- }
-
- static boolean isDoubleEscaped(String messagePattern, int delimeterStartIndex) {
- return delimeterStartIndex >= 2 && messagePattern.charAt(delimeterStartIndex - 2) == 92;
- }
-
- private static void deeplyAppendParameter(StringBuilder sbuf, Object o, Map
- org.hongxi
- whatsmars-logging
- Rocket.S9
+ org.slf4j
+ slf4j-api
+
+
+ org.apache.logging.log4j
+ log4j-slf4j-impl
+ true
+
+
+ org.apache.logging.log4j
+ log4j-core
+ true
+
+
+ com.lmax
+ disruptor
+ true
diff --git a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/common/RemotingHelper.java b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/common/RemotingHelper.java
index 951f64c9cc6e619708a7d1695be8770b4f6e67f9..cbdd127668621c30856085be8ec9136b111187d1 100644
--- a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/common/RemotingHelper.java
+++ b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/common/RemotingHelper.java
@@ -17,12 +17,12 @@
package org.hongxi.whatsmars.remoting.common;
import io.netty.channel.Channel;
-import org.hongxi.whatsmars.common.logging.InternalLogger;
-import org.hongxi.whatsmars.common.logging.InternalLoggerFactory;
import org.hongxi.whatsmars.remoting.exception.RemotingConnectException;
import org.hongxi.whatsmars.remoting.exception.RemotingSendRequestException;
import org.hongxi.whatsmars.remoting.exception.RemotingTimeoutException;
import org.hongxi.whatsmars.remoting.protocol.RemotingCommand;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.InetSocketAddress;
@@ -34,7 +34,7 @@ public class RemotingHelper {
public static final String ROCKETMQ_REMOTING = "RocketmqRemoting";
public static final String DEFAULT_CHARSET = "UTF-8";
- private static final InternalLogger log = InternalLoggerFactory.getLogger(ROCKETMQ_REMOTING);
+ private static final Logger log = LoggerFactory.getLogger(ROCKETMQ_REMOTING);
public static String exceptionSimpleDesc(final Throwable e) {
StringBuffer sb = new StringBuffer();
diff --git a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/common/RemotingUtil.java b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/common/RemotingUtil.java
index f87cf25e7759111ecb534c9d8872b391c7ff88ca..f0404d2b9e4ccbc0bfadd234ae2da71f6fd5962a 100644
--- a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/common/RemotingUtil.java
+++ b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/common/RemotingUtil.java
@@ -19,8 +19,8 @@ package org.hongxi.whatsmars.remoting.common;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
-import org.hongxi.whatsmars.common.logging.InternalLogger;
-import org.hongxi.whatsmars.common.logging.InternalLoggerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.lang.reflect.Method;
@@ -34,7 +34,7 @@ import java.util.Enumeration;
public class RemotingUtil {
public static final String OS_NAME = System.getProperty("os.name");
- private static final InternalLogger log = InternalLoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
+ private static final Logger log = LoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
private static boolean isLinuxPlatform = false;
private static boolean isWindowsPlatform = false;
diff --git a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/common/ServiceThread.java b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/common/ServiceThread.java
index acdc31cb2bf57e0ad7cd6bbcb23f59a5e8ede17c..bb72c19577b2efab84a93b1e3f15069d8530f081 100644
--- a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/common/ServiceThread.java
+++ b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/common/ServiceThread.java
@@ -16,15 +16,14 @@
*/
package org.hongxi.whatsmars.remoting.common;
-
-import org.hongxi.whatsmars.common.logging.InternalLogger;
-import org.hongxi.whatsmars.common.logging.InternalLoggerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Base class for background thread
*/
public abstract class ServiceThread implements Runnable {
- private static final InternalLogger log = InternalLoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
+ private static final Logger log = LoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
private static final long JOIN_TIME = 90 * 1000;
protected final Thread thread;
diff --git a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyDecoder.java b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyDecoder.java
index d03911556a2a716d393b4a76ba98d07839505c81..fefaf98e2a0841ec2900780952e00f1e1a0adcda 100644
--- a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyDecoder.java
+++ b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyDecoder.java
@@ -19,16 +19,16 @@ package org.hongxi.whatsmars.remoting.netty;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
-import org.hongxi.whatsmars.common.logging.InternalLogger;
-import org.hongxi.whatsmars.common.logging.InternalLoggerFactory;
import org.hongxi.whatsmars.remoting.common.RemotingHelper;
import org.hongxi.whatsmars.remoting.common.RemotingUtil;
import org.hongxi.whatsmars.remoting.protocol.RemotingCommand;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.nio.ByteBuffer;
public class NettyDecoder extends LengthFieldBasedFrameDecoder {
- private static final InternalLogger log = InternalLoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
+ private static final Logger log = LoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
private static final int FRAME_MAX_LENGTH =
Integer.parseInt(System.getProperty("com.rocketmq.remoting.frameMaxLength", "16777216"));
diff --git a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyEncoder.java b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyEncoder.java
index 7de513a1dea881d3e79147eb7721a5634c8fe766..8cb09daa20b7f8d12143bbde76e10b8b579206cf 100644
--- a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyEncoder.java
+++ b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyEncoder.java
@@ -19,16 +19,16 @@ package org.hongxi.whatsmars.remoting.netty;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;
-import org.hongxi.whatsmars.common.logging.InternalLogger;
-import org.hongxi.whatsmars.common.logging.InternalLoggerFactory;
import org.hongxi.whatsmars.remoting.common.RemotingHelper;
import org.hongxi.whatsmars.remoting.common.RemotingUtil;
import org.hongxi.whatsmars.remoting.protocol.RemotingCommand;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.nio.ByteBuffer;
public class NettyEncoder extends MessageToByteEncoder {
- private static final InternalLogger log = InternalLoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
+ private static final Logger log = LoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
@Override
public void encode(ChannelHandlerContext ctx, RemotingCommand remotingCommand, ByteBuf out)
diff --git a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyLogger.java b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyLogger.java
index e945d195dfdefd56e2a4b53ff7ff349d0503b0a1..7121d8e4c6fa2032453352f48c31b23c9b3d68d4 100644
--- a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyLogger.java
+++ b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyLogger.java
@@ -19,8 +19,8 @@ package org.hongxi.whatsmars.remoting.netty;
import io.netty.util.internal.logging.InternalLogLevel;
-import org.hongxi.whatsmars.common.logging.InternalLogger;
-import org.hongxi.whatsmars.common.logging.InternalLoggerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -50,10 +50,10 @@ public class NettyLogger {
private static class NettyBridgeLogger implements io.netty.util.internal.logging.InternalLogger {
- private InternalLogger logger = null;
+ private Logger logger = null;
public NettyBridgeLogger(String name) {
- logger = InternalLoggerFactory.getLogger(name);
+ logger = LoggerFactory.getLogger(name);
}
@Override
diff --git a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyRemotingAbstract.java b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyRemotingAbstract.java
index 8035f26fe8d107cc53808d026dd9c13999f588fe..d462e22fb7dce57babbb7cc6a7ec9ce2e313f85c 100644
--- a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyRemotingAbstract.java
+++ b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyRemotingAbstract.java
@@ -22,8 +22,6 @@ import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.SslHandler;
-import org.hongxi.whatsmars.common.logging.InternalLogger;
-import org.hongxi.whatsmars.common.logging.InternalLoggerFactory;
import org.hongxi.whatsmars.remoting.ChannelEventListener;
import org.hongxi.whatsmars.remoting.InvokeCallback;
import org.hongxi.whatsmars.remoting.RPCHook;
@@ -36,6 +34,8 @@ import org.hongxi.whatsmars.remoting.exception.RemotingTimeoutException;
import org.hongxi.whatsmars.remoting.exception.RemotingTooMuchRequestException;
import org.hongxi.whatsmars.remoting.protocol.RemotingCommand;
import org.hongxi.whatsmars.remoting.protocol.RemotingSysResponseCode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.net.SocketAddress;
import java.util.HashMap;
@@ -50,7 +50,7 @@ public abstract class NettyRemotingAbstract {
/**
* Remoting logger instance.
*/
- private static final InternalLogger log = InternalLoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
+ private static final Logger log = LoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
/**
* Semaphore to limit maximum number of on-going one-way requests, which protects system memory footprint.
diff --git a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyRemotingClient.java b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyRemotingClient.java
index 9ec75f8e3f637fa2213b37367fb0182e3f7558f1..89a6dc4342b1aa7b7daf4fc818297cf1f410199a 100644
--- a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyRemotingClient.java
+++ b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyRemotingClient.java
@@ -25,8 +25,6 @@ import io.netty.handler.timeout.IdleState;
import io.netty.handler.timeout.IdleStateEvent;
import io.netty.handler.timeout.IdleStateHandler;
import io.netty.util.concurrent.DefaultEventExecutorGroup;
-import org.hongxi.whatsmars.common.logging.InternalLogger;
-import org.hongxi.whatsmars.common.logging.InternalLoggerFactory;
import org.hongxi.whatsmars.remoting.ChannelEventListener;
import org.hongxi.whatsmars.remoting.InvokeCallback;
import org.hongxi.whatsmars.remoting.RPCHook;
@@ -39,6 +37,8 @@ import org.hongxi.whatsmars.remoting.exception.RemotingSendRequestException;
import org.hongxi.whatsmars.remoting.exception.RemotingTimeoutException;
import org.hongxi.whatsmars.remoting.exception.RemotingTooMuchRequestException;
import org.hongxi.whatsmars.remoting.protocol.RemotingCommand;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.SocketAddress;
@@ -51,7 +51,7 @@ import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class NettyRemotingClient extends NettyRemotingAbstract implements RemotingClient {
- private static final InternalLogger log = InternalLoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
+ private static final Logger log = LoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
private static final long LOCK_TIMEOUT_MILLIS = 3000;
diff --git a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyRemotingServer.java b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyRemotingServer.java
index ecd118e5f429618e0cacc6c56d93359dc7036c08..61ad74feaacc67a3dd93be2bc0b1d69cf2df954a 100644
--- a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyRemotingServer.java
+++ b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/NettyRemotingServer.java
@@ -30,8 +30,6 @@ import io.netty.handler.timeout.IdleState;
import io.netty.handler.timeout.IdleStateEvent;
import io.netty.handler.timeout.IdleStateHandler;
import io.netty.util.concurrent.DefaultEventExecutorGroup;
-import org.hongxi.whatsmars.common.logging.InternalLogger;
-import org.hongxi.whatsmars.common.logging.InternalLoggerFactory;
import org.hongxi.whatsmars.remoting.ChannelEventListener;
import org.hongxi.whatsmars.remoting.InvokeCallback;
import org.hongxi.whatsmars.remoting.RPCHook;
@@ -44,6 +42,8 @@ import org.hongxi.whatsmars.remoting.exception.RemotingSendRequestException;
import org.hongxi.whatsmars.remoting.exception.RemotingTimeoutException;
import org.hongxi.whatsmars.remoting.exception.RemotingTooMuchRequestException;
import org.hongxi.whatsmars.remoting.protocol.RemotingCommand;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.InetSocketAddress;
@@ -57,7 +57,7 @@ import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
public class NettyRemotingServer extends NettyRemotingAbstract implements RemotingServer {
- private static final InternalLogger log = InternalLoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
+ private static final Logger log = LoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
private final ServerBootstrap serverBootstrap;
private final EventLoopGroup eventLoopGroupSelector;
private final EventLoopGroup eventLoopGroupBoss;
diff --git a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/TlsHelper.java b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/TlsHelper.java
index 93f8fad012092f1896120fe33bd19d9ba6c97591..9ae9ab2bedf2425743aa36483b64fe98eb6b44a1 100644
--- a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/TlsHelper.java
+++ b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/netty/TlsHelper.java
@@ -20,9 +20,9 @@ package org.hongxi.whatsmars.remoting.netty;
import io.netty.handler.ssl.*;
import io.netty.handler.ssl.util.InsecureTrustManagerFactory;
import io.netty.handler.ssl.util.SelfSignedCertificate;
-import org.hongxi.whatsmars.common.logging.InternalLogger;
-import org.hongxi.whatsmars.common.logging.InternalLoggerFactory;
import org.hongxi.whatsmars.remoting.common.RemotingHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
@@ -47,7 +47,7 @@ public class TlsHelper {
InputStream decryptPrivateKey(String privateKeyEncryptPath, boolean forClient) throws IOException;
}
- private static final InternalLogger LOGGER = InternalLoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
+ private static final Logger LOGGER = LoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
private static DecryptionStrategy decryptionStrategy = new DecryptionStrategy() {
@Override
diff --git a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/protocol/RemotingCommand.java b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/protocol/RemotingCommand.java
index 262390f4195f87ff9018f506d7ea007e64fd96fd..67799c325840778494880cd3e4234c53c68469ef 100644
--- a/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/protocol/RemotingCommand.java
+++ b/whatsmars-rpc/whatsmars-remoting/src/main/java/org/hongxi/whatsmars/remoting/protocol/RemotingCommand.java
@@ -17,12 +17,12 @@
package org.hongxi.whatsmars.remoting.protocol;
import com.alibaba.fastjson.annotation.JSONField;
-import org.hongxi.whatsmars.common.logging.InternalLogger;
-import org.hongxi.whatsmars.common.logging.InternalLoggerFactory;
import org.hongxi.whatsmars.remoting.CommandCustomHeader;
import org.hongxi.whatsmars.remoting.annotation.CFNotNull;
import org.hongxi.whatsmars.remoting.common.RemotingHelper;
import org.hongxi.whatsmars.remoting.exception.RemotingCommandException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
@@ -36,7 +36,7 @@ public class RemotingCommand {
public static final String SERIALIZE_TYPE_PROPERTY = "rocketmq.serialize.type";
public static final String SERIALIZE_TYPE_ENV = "ROCKETMQ_SERIALIZE_TYPE";
public static final String REMOTING_VERSION_KEY = "rocketmq.remoting.version";
- private static final InternalLogger log = InternalLoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
+ private static final Logger log = LoggerFactory.getLogger(RemotingHelper.ROCKETMQ_REMOTING);
private static final int RPC_TYPE = 0; // 0, REQUEST_COMMAND
private static final int RPC_ONEWAY = 1; // 0, RPC
private static final Map, Field[]> CLASS_HASH_MAP =