mxsm commented on code in PR #4507:
URL: https://github.com/apache/eventmesh/pull/4507#discussion_r1375577631


##########
eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/common/RequestContext.java:
##########
@@ -76,9 +77,7 @@ public void finish(Package msg) {
 
     public static RequestContext context(Object key, Package request, 
CountDownLatch latch) throws Exception {
         RequestContext c = new RequestContext(key, request, latch);
-        if (log.isInfoEnabled()) {
-            log.info("_RequestContext|create|key=" + key);
-        }
+        LogUtils.info(log, "_RequestContext|create|key=" + key);

Review Comment:
   How about replace with:
   ```java
    LogUtils.info(log, "_RequestContext|create|key={}", key);
   ```



##########
eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/demo/BroadCastSubClient.java:
##########
@@ -46,9 +47,7 @@ public void handle(Package msg, ChannelHandlerContext ctx) {
                     if (msg.getHeader().getCommand() == 
Command.BROADCAST_MESSAGE_TO_CLIENT) {
                         if (msg.getBody() instanceof EventMeshMessage) {
                             String body = ((EventMeshMessage) 
msg.getBody()).getBody();
-                            if (log.isInfoEnabled()) {
-                                log.info("receive message 
-------------------------------" + body);
-                            }
+                            LogUtils.info(log, "receive message 
-------------------------------" + body);

Review Comment:
   Same as above



##########
eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/grpc/producer/EventMeshGrpcProducer.java:
##########
@@ -60,9 +61,7 @@ public EventMeshGrpcProducer(EventMeshGrpcClientConfig 
clientConfig) {
     }
 
     public <T> Response publish(T message) {
-        if (log.isInfoEnabled()) {
-            log.info("Publish message " + message.toString());
-        }
+        LogUtils.info(log, "Publish message " + message.toString());

Review Comment:
   Same as above



##########
eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/demo/SyncPubClient.java:
##########
@@ -38,10 +39,8 @@ public static void main(String[] args) throws Exception {
                 Package rr = 
pubClient.rr(MessageUtils.rrMesssage("TEST-TOPIC-TCP-SYNC", i), 3000);
                 if (rr.getBody() instanceof EventMeshMessage) {
                     String body = ((EventMeshMessage) rr.getBody()).getBody();
-                    if (log.isInfoEnabled()) {
-                        log.info("rrMessage: " + body + "             "
-                            + 
"rr-reply-------------------------------------------------" + rr);
-                    }
+                    LogUtils.info(log, "rrMessage: " + body + "             "
+                        + 
"rr-reply-------------------------------------------------" + rr);

Review Comment:
   Same as above



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to