seagle-yuan commented on code in PR #1838:
URL:
https://github.com/apache/incubator-hugegraph/pull/1838#discussion_r854078672
##########
hugegraph-example/src/main/java/com/baidu/hugegraph/example/Example1.java:
##########
@@ -382,39 +382,39 @@ public static void testQuery(final HugeGraph graph) {
vertices = graph.traversal().V().hasLabel("book");
size = vertices.toList().size();
assert size == 5;
- LOG.info(">>>> query all books: size=" + size);
+ LOG.info(">>>> query all books: size {}", size);
// query by vertex label and key-name
vertices = graph.traversal().V().hasLabel("person").has("age");
size = vertices.toList().size();
assert size == 5;
- LOG.info(">>>> query all persons with age: size=" + size);
+ LOG.info(">>>> query all persons with age: size {}", size);
// query by vertex props
vertices = graph.traversal().V().hasLabel("person")
.has("city", "Taipei");
vertexList = vertices.toList();
assert vertexList.size() == 1;
- LOG.info(">>>> query all persons in Taipei: " + vertexList);
+ LOG.info(">>>> query all persons in Taipei: {}", vertexList);
vertices = graph.traversal().V().hasLabel("person").has("age", 19);
vertexList = vertices.toList();
assert vertexList.size() == 1;
- LOG.info(">>>> query all persons age==19: " + vertexList);
+ LOG.info(">>>> query all persons age==19: {}", vertexList);
vertices = graph.traversal().V().hasLabel("person")
.has("age", P.lt(19));
vertexList = vertices.toList();
assert vertexList.size() == 1;
assert vertexList.get(0).property("age").value().equals(3);
- LOG.info(">>>> query all persons age<19: " + vertexList);
+ LOG.info(">>>> query all persons age<19: {}", vertexList);
String addr = "Bay Area";
vertices = graph.traversal().V().hasLabel("author")
.has("lived", Text.contains(addr));
vertexList = vertices.toList();
assert vertexList.size() == 1;
- LOG.info(String.format(">>>> query all authors lived %s: %s",
+ LOG.info(String.format(">>>> query all authors lived {}: {}",
addr, vertexList));
}
Review Comment:
can we use LOG.info(">>>> query all authors lived {}: {}",addr, vertexList);
--
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]