imbajin commented on code in PR #2347:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2347#discussion_r1389182914


##########
hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java:
##########
@@ -57,17 +55,38 @@ public class AccessLogFilter implements 
ContainerResponseFilter {
     @Context
     private jakarta.inject.Provider<HugeConfig> configProvider;
 
+    public static boolean needRecord(ContainerRequestContext context) {
+        // TODO: add test for 'path' result ('/gremlin' or 'gremlin')
+        String path = context.getUriInfo().getPath();
+
+        // GraphsAPI/CypherAPI/Job GremlinAPI
+        if (path.startsWith(GRAPHS)) {
+            if (HttpMethod.GET.equals(context.getMethod()) ||
+                path.endsWith(CYPHER) || path.endsWith(GREMLIN)) {
+                return true;
+            }
+        }
+        // Raw GremlinAPI
+        return path.startsWith(GREMLIN);

Review Comment:
   
![img_v3_0252_d6fffc97-5dfd-494d-b28d-cc3c4b1f0cbg](https://github.com/apache/incubator-hugegraph/assets/17706099/0260dfe1-cafd-4bac-bb3a-4d28394044b8)
   
   seems the judge logic is not right?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to