[ 
https://issues.apache.org/jira/browse/SCB-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16490434#comment-16490434
 ] 

ASF GitHub Bot commented on SCB-607:
------------------------------------

yhs0092 commented on a change in pull request #727: [SCB-607] Accesslog support 
invocation context item
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/727#discussion_r190829522
 
 

 ##########
 File path: 
common/common-rest/src/main/java/org/apache/servicecomb/common/rest/AbstractRestInvocation.java
 ##########
 @@ -249,4 +265,21 @@ protected void onExecuteHttpServerFiltersFinish(Response 
response, Throwable e)
       invocation.onFinish(response);
     }
   }
+
+  public void setAfterCreateInvocationHandler(
 
 Review comment:
   I guess you mean to replace the `AfterCreateInvocationHandler` with the 
method `protected void afterCreateInvocation()` ?
   But currently we cannot get RoutingContext directly in 
`AbstractRestInvocation`, unless we cast the type of  
`AbstractRestInvocation.requestEx` and add a getter into 
`VertxServerRequestToHttpServletRequest` like below:
   ```java
   protected void afterCreateInvocation() {
     if 
(!VertxServerRequestToHttpServletRequest.class.isAssignableFrom(this.requestEx.getClass()))
 {
       return;
     }
     VertxServerRequestToHttpServletRequest request = 
(VertxServerRequestToHttpServletRequest) this.requestEx;
     RoutingContext routingContext = request.getContext();
     routingContext.put(RestConst.REST_INVOCATION_CONTEXT, this.invocation);
   }
   ```
   
   Am I right?

----------------------------------------------------------------
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:
us...@infra.apache.org


> Support printing invocation context in access log
> -------------------------------------------------
>
>                 Key: SCB-607
>                 URL: https://issues.apache.org/jira/browse/SCB-607
>             Project: Apache ServiceComb
>          Issue Type: New Feature
>          Components: Java-Chassis
>            Reporter: YaoHaishi
>            Assignee: YaoHaishi
>            Priority: Major
>             Fix For: java-chassis-1.0.0-m2
>
>
> Add a new access log item to print specific invocation context content.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to