lynnbond commented on code in PR #2327:
URL:
https://github.com/apache/incubator-hugegraph/pull/2327#discussion_r1368359276
##########
hugegraph-api/src/main/java/org/apache/hugegraph/api/filter/AccessLogFilter.java:
##########
@@ -79,4 +107,24 @@ private String join(String path1, String path2) {
private boolean statusOk(int status){
return status == 200 || status == 201 || status == 202;
}
+
+ public static boolean isSlowQueryLogWhiteAPI(ContainerRequestContext
context) {
+ String path = context.getUriInfo().getPath();
+ String method = context.getRequest().getMethod();
+
+ // GraphsAPI
+ if (path.startsWith(GRAPHS) && method.equals(HttpMethod.GET)) {
+ return true;
+ }
+ // CypherAPI
+ if (path.startsWith(GRAPHS) && path.endsWith(CYPHER)) {
+ return true;
+ }
+ // Job GremlinAPI
+ if (path.startsWith(GRAPHS) && path.endsWith(GREMLIN)) {
+ return true;
+ }
Review Comment:
```
if (path.startsWith(GRAPHS)) {
if (method.equals(HttpMethod.GET)
|| path.endsWith(CYPHER)
|| path.endsWith(GREMLIN)){
return true;
}
}
```
Is it better, 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]