From 366e56921b422d6419ff45d4196bc47747c0c937 Mon Sep 17 00:00:00 2001 From: Pil0tXia Date: Mon, 25 Mar 2024 21:59:51 +0800 Subject: [PATCH] Change the logging level of `msg ignored` from error to warn --- .../apache/eventmesh/runtime/client/impl/PubClientImpl.java | 4 ++-- .../apache/eventmesh/runtime/client/impl/SubClientImpl.java | 2 +- .../client/tcp/impl/AbstractEventMeshTCPSubHandler.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/PubClientImpl.java b/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/PubClientImpl.java index cb6cf5dabe..8735674546 100644 --- a/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/PubClientImpl.java +++ b/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/PubClientImpl.java @@ -195,7 +195,7 @@ protected void channelRead0(ChannelHandlerContext ctx, Package msg) throws Excep contexts.remove(context.getKey()); context.finish(msg); } else { - log.error("msg ignored,context not found .|{}|{}", cmd, msg); + log.warn("msg ignored,context not found.|{}|{}", cmd, msg); } } else if (cmd == Command.SERVER_GOODBYE_REQUEST) { log.error("server goodbye request: ---------------------------{}", msg); @@ -206,7 +206,7 @@ protected void channelRead0(ChannelHandlerContext ctx, Package msg) throws Excep contexts.remove(context.getKey()); context.finish(msg); } else { - log.error("msg ignored,context not found .|{}|{}", cmd, msg); + log.warn("msg ignored,context not found.|{}|{}", cmd, msg); } } } diff --git a/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/SubClientImpl.java b/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/SubClientImpl.java index f419d0d216..841676f027 100644 --- a/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/SubClientImpl.java +++ b/eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/client/impl/SubClientImpl.java @@ -236,7 +236,7 @@ protected void channelRead0(ChannelHandlerContext ctx, Package msg) throws Excep contexts.remove(context.getKey()); context.finish(msg); } else { - log.error("msg ignored,context not found.|{}|{}", cmd, msg); + log.warn("msg ignored,context not found.|{}|{}", cmd, msg); } } } diff --git a/eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/AbstractEventMeshTCPSubHandler.java b/eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/AbstractEventMeshTCPSubHandler.java index 4669244b9f..0c9a69547a 100644 --- a/eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/AbstractEventMeshTCPSubHandler.java +++ b/eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/AbstractEventMeshTCPSubHandler.java @@ -63,14 +63,14 @@ protected void channelRead0(ChannelHandlerContext ctx, Package msg) throws Excep // TODO break; default: - log.error("msg ignored|{}|{}", cmd, msg); + log.warn("msg ignored|{}|{}", cmd, msg); } RequestContext context = contexts.get(RequestContext.key(msg)); if (context != null) { contexts.remove(context.getKey()); context.finish(msg); } else { - log.error("msg ignored,context not found.|{}|{}", cmd, msg); + log.warn("msg ignored,context not found.|{}|{}", cmd, msg); } }