Pil0tXia commented on code in PR #3930:
URL: https://github.com/apache/eventmesh/pull/3930#discussion_r1575606797


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/util/TraceUtils.java:
##########
@@ -106,18 +100,21 @@ public static void finishSpan(ChannelHandlerContext ctx, 
CloudEvent event) {
     public static void finishSpanWithException(ChannelHandlerContext ctx, 
CloudEvent event,
         String errMsg, Throwable e) {
         try {
-            log.debug("finishSpanWithException with event:{}", event);
+            if (log.isWarnEnabled()) {
+                log.warn("finishSpanWithException with event:{}", event);
+            }
             EventMeshServer.getTrace().addTraceInfoToSpan(ctx, event);
             EventMeshServer.getTrace().finishSpan(ctx, StatusCode.ERROR, 
errMsg, e);
         } catch (Throwable ex) {
             log.error("upload trace fail when finishSpanWithException", ex);
         }
     }
 
-    public static void finishSpanWithException(Span span, Map<String, Object> 
map, String errMsg,
-        Throwable e) {
+    public static void finishSpanWithException(Span span, Map<String, Object> 
map, String errMsg, Throwable e) {
         try {
-            log.debug("finishSpanWithException with map:{}", map);
+            if (log.isWarnEnabled()) {
+                log.warn("FinishSpanWithException with map:{}", map);
+            }

Review Comment:
   May I ask that why logging level should be upgraded to `warn` here?
   
   By the way, `log.isWarnEnabled()` is redundant~



-- 
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: issues-unsubscr...@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@eventmesh.apache.org
For additional commands, e-mail: issues-h...@eventmesh.apache.org

Reply via email to