You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/06/14 12:19:57 UTC

[GitHub] wujimin closed pull request #766: [SCB-661]logs give more information and remove unnecessary log for each invocation

wujimin closed pull request #766: [SCB-661]logs give more information and remove unnecessary log for each invocation
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/766
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/src/main/java/org/apache/servicecomb/core/definition/schema/ConsumerSchemaFactory.java b/core/src/main/java/org/apache/servicecomb/core/definition/schema/ConsumerSchemaFactory.java
index 2dd77556d..a3dbbdb3a 100644
--- a/core/src/main/java/org/apache/servicecomb/core/definition/schema/ConsumerSchemaFactory.java
+++ b/core/src/main/java/org/apache/servicecomb/core/definition/schema/ConsumerSchemaFactory.java
@@ -72,6 +72,7 @@ protected Swagger loadSwagger(ConsumerSchemaContext context) {
         context.getMicroservice().getVersion(),
         context.getSchemaId(),
         !StringUtils.isEmpty(schemaContent));
+    LOGGER.debug(schemaContent);
     if (schemaContent != null) {
       return SchemaUtils.parseSwagger(schemaContent);
     }
diff --git a/handlers/handler-bizkeeper/src/main/java/org/apache/servicecomb/bizkeeper/BizkeeperCommand.java b/handlers/handler-bizkeeper/src/main/java/org/apache/servicecomb/bizkeeper/BizkeeperCommand.java
index aad3893d1..a582041f2 100644
--- a/handlers/handler-bizkeeper/src/main/java/org/apache/servicecomb/bizkeeper/BizkeeperCommand.java
+++ b/handlers/handler-bizkeeper/src/main/java/org/apache/servicecomb/bizkeeper/BizkeeperCommand.java
@@ -79,7 +79,8 @@ protected String getCacheKey() {
         invocation.next(resp -> {
           if (isFailedResponse(resp)) {
             // e should implements toString
-            LOG.warn("bizkeeper command failed due to:" + resp.getResult());
+            LOG.warn("bizkeeper command {} failed due to {}", invocation.getInvocationQualifiedName(),
+                resp.getResult());
             f.onError(resp.getResult());
             FallbackPolicyManager.record(type, invocation, resp, false);
           } else {
@@ -89,7 +90,8 @@ protected String getCacheKey() {
           }
         });
       } catch (Exception e) {
-        LOG.warn("bizkeeper command execute failed due to:" + e.getClass().getName());
+        LOG.warn("bizkeeper command {} execute failed due to {}", invocation.getInvocationQualifiedName(),
+            e.getClass().getName());
         f.onError(e);
       }
     });
diff --git a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java
index 723abef24..06ffb9bc1 100644
--- a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java
+++ b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/LoadbalanceHandler.java
@@ -223,7 +223,8 @@ public void onStartWithServer(ExecutionContext<Invocation> context,
       @Override
       public void onExceptionWithServer(ExecutionContext<Invocation> context, Throwable exception,
           ExecutionInfo info) {
-        LOGGER.error("onExceptionWithServer msg {}; server {}",
+        LOGGER.error("onExceptionWithServer operation {}; msg {}; server {}",
+            context.getRequest().getInvocationQualifiedName(),
             exception.getMessage(),
             context.getRequest().getEndpoint());
       }
@@ -274,7 +275,8 @@ public void onExecutionFailed(ExecutionContext<Invocation> context, Throwable fi
             invocation.setEndpoint(((CseServer) s).getEndpoint());
             invocation.next(resp -> {
               if (isFailedResponse(resp)) {
-                LOGGER.error("service call error, msg is {}, server is {} ",
+                LOGGER.error("service {}, call error, msg is {}, server is {} ",
+                    invocation.getInvocationQualifiedName(),
                     ((Throwable) resp.getResult()).getMessage(),
                     s);
                 chosenLB.getLoadBalancerStats().incrementSuccessiveConnectionFailureCount(s);
diff --git a/handlers/handler-publickey-auth/src/main/java/org/apache/servicecomb/authentication/provider/RSAProviderTokenManager.java b/handlers/handler-publickey-auth/src/main/java/org/apache/servicecomb/authentication/provider/RSAProviderTokenManager.java
index aaffa3fe2..9c379a9c0 100644
--- a/handlers/handler-publickey-auth/src/main/java/org/apache/servicecomb/authentication/provider/RSAProviderTokenManager.java
+++ b/handlers/handler-publickey-auth/src/main/java/org/apache/servicecomb/authentication/provider/RSAProviderTokenManager.java
@@ -49,7 +49,6 @@ public boolean valid(String token) {
         return false;
       }
       if (validatedToken.contains(rsaToken)) {
-        LOGGER.info("found vaildate token in vaildate pool");
         return true;
       }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services