[ https://issues.apache.org/jira/browse/S2GRAPH-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16418557#comment-16418557 ]
ASF GitHub Bot commented on S2GRAPH-191: ---------------------------------------- GitHub user daewon opened a pull request: https://github.com/apache/incubator-s2graph/pull/146 [S2GRAPH-191] Providing request / response logging to GraphQL server and removing println 1. I removed the dependency by adding `ExclusionRule (" org.apache.logging.log4j "," log4j-slf4j-impl ")` to `Common.scala` to fix` multiple_binding` error. ```bash s2graphql[ERROR] SLF4J: Class path contains multiple SLF4J bindings. s2graphql[ERROR] SLF4J: Found binding in [jar:file:/Users/daewon/.ivy2/cache/org.apache.logging.log4j/log4j-slf4j-impl/jars/log4j-slf4j-impl-2.9.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] s2graphql[ERROR] SLF4J: Found binding in [jar:file:/Users/daewon/.ivy2/cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.7.21.jar!/org/slf4j/impl/StaticLoggerBinder.class] s2graphql[ERROR] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. s2graphql[ERROR] SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] s2graphql[ERROR] ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging. ``` 2. Added logging for error messages. From now on, if an error occurs as below, you can see that the same message is also recorded in the server log. ```bash 8095 [pool-7-thread-2] WARN org.apache.s2graph.graphql.repository.GraphRepository - createService Failed: java.lang.RuntimeException: Service (daewon) already exists at org.apache.s2graph.graphql.repository.GraphRepository.createService(GraphRepository.scala:110) at org.apache.s2graph.graphql.types.S2ManagementType$$anonfun$10.apply(S2ManagementType.scala:308) at org.apache.s2graph.graphql.types.S2ManagementType$$anonfun$10.apply(S2ManagementType.scala:308) at sangria.execution.Resolver.resolveField(Resolver.scala:1024) at sangria.execution.Resolver$$anonfun$collectActionsPar$1.apply(Resolver.scala:445) at sangria.execution.Resolver$$anonfun$collectActionsPar$1.apply(Resolver.scala:439) at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:155) ``` ![2018-03-29 4 33 28](https://user-images.githubusercontent.com/1182522/38076135-af29f05e-336f-11e8-9f33-e113d43a90a3.png) You can merge this pull request into a Git repository by running: $ git pull https://github.com/daewon/incubator-s2graph S2GRAPH-191 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-s2graph/pull/146.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #146 ---- commit d137bb3056d79cfe5df22baf109b873117d19629 Author: daewon <daewon@...> Date: 2018-03-29T07:36:36Z add logging for Management API and HTTP Request/Reponse ---- > Providing request / response logging to GraphQL server and removing println > ---------------------------------------------------------------------------- > > Key: S2GRAPH-191 > URL: https://issues.apache.org/jira/browse/S2GRAPH-191 > Project: S2Graph > Issue Type: Improvement > Reporter: Daewon Jeong > Assignee: Daewon Jeong > Priority: Minor > Labels: usability > > The GraphQL server, which is still the experiment phase, does not provide > logging, but prints the contents of the server to stdout using the println > method. > Therefore, there is a problem that the contents of the error are not properly > reported at the time of development, which makes debugging impossible. > Improve the above problem > The logger uses the slf4j interface in accordance with the outline of the > existing -S2GRAPH-117(-Cleaner logging library usage) -- This message was sent by Atlassian JIRA (v7.6.3#76005)