You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2020/04/08 12:47:15 UTC
[servicecomb-java-chassis] branch master updated: [SCB-1857] RequestLog增加仅针对CONSUMER类型的InvocationFinishEvent处理
This is an automated email from the ASF dual-hosted git repository.
liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git
The following commit(s) were added to refs/heads/master by this push:
new 701ebda [SCB-1857] RequestLog增加仅针对CONSUMER类型的InvocationFinishEvent处理
701ebda is described below
commit 701ebda72ac95533e14464fc14b8400d0b1950fd
Author: 王洪刚 00301030 <wa...@huawei.com>
AuthorDate: Wed Apr 8 15:04:15 2020 +0800
[SCB-1857] RequestLog增加仅针对CONSUMER类型的InvocationFinishEvent处理
---
.../common/accessLog/client/ClientDefaultInitializer.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/common/common-access-log/src/main/java/org/apache/servicecomb/common/accessLog/client/ClientDefaultInitializer.java b/common/common-access-log/src/main/java/org/apache/servicecomb/common/accessLog/client/ClientDefaultInitializer.java
index 113ffc1..0f419a1 100644
--- a/common/common-access-log/src/main/java/org/apache/servicecomb/common/accessLog/client/ClientDefaultInitializer.java
+++ b/common/common-access-log/src/main/java/org/apache/servicecomb/common/accessLog/client/ClientDefaultInitializer.java
@@ -22,6 +22,7 @@ import org.apache.servicecomb.common.accessLog.AccessLogInitializer;
import org.apache.servicecomb.common.accessLog.core.AccessLogGenerator;
import org.apache.servicecomb.core.event.InvocationFinishEvent;
+import org.apache.servicecomb.swagger.invocation.InvocationType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -46,6 +47,8 @@ public class ClientDefaultInitializer implements AccessLogInitializer {
@Subscribe
@AllowConcurrentEvents
public void onRequestOut(InvocationFinishEvent finishEvent) {
- LOGGER.info(accessLogGenerator.generateClientLog(finishEvent));
+ if (InvocationType.CONSUMER.equals(finishEvent.getInvocation().getInvocationType())) {
+ LOGGER.info(accessLogGenerator.generateClientLog(finishEvent));
+ }
}
}