{"action":"created","comment":{"url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls/comments/168789405","pull_request_review_id":97217718,"id":168789405,"diff_hunk":"@@ -0,0 +1,48 @@\n+/**\n+ * Copyright 2017-2018 The OpenTracing Authors\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except\n+ * in compliance with the License. You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License\n+ * is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n+ * or implied. See the License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+package io.opentracing.contrib.spring.cloud.log;\n+\n+import ch.qos.logback.classic.Logger;\n+import ch.qos.logback.classic.LoggerContext;\n+import io.opentracing.Tracer;\n+import io.opentracing.contrib.spring.web.autoconfig.TracerAutoConfiguration;\n+import org.slf4j.LoggerFactory;\n+import org.springframework.boot.autoconfigure.AutoConfigureAfter;\n+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;\n+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;\n+import org.springframework.context.annotation.Bean;\n+import org.springframework.context.annotation.Configuration;\n+\n+/**\n+ * @author Pavol Loffay\n+ */\n+@Configuration\n+@ConditionalOnBean(Tracer.class)\n+@AutoConfigureAfter(TracerAutoConfiguration.class)\n+@ConditionalOnProperty(name = \"opentracing.spring.cloud.log.enabled\", havingValue = \"true\", matchIfMissing = true)\n+public class LoggingAutoConfiguration {\n+\n+  @Bean","path":"opentracing-spring-cloud/src/main/java/io/opentracing/contrib/spring/cloud/log/LoggingAutoConfiguration.java","position":36,"original_position":36,"commit_id":"9faebf06a446b120657f3f05b6963cd9ea3a4cef","original_commit_id":"9faebf06a446b120657f3f05b6963cd9ea3a4cef","user":{"login":"geoand","id":4374975,"avatar_url":"https://avatars2.githubusercontent.com/u/4374975?v=4","gravatar_id":"","url":"https://api.github.com/users/geoand","html_url":"https://github.com/geoand","followers_url":"https://api.github.com/users/geoand/followers","following_url":"https://api.github.com/users/geoand/following{/other_user}","gists_url":"https://api.github.com/users/geoand/gists{/gist_id}","starred_url":"https://api.github.com/users/geoand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoand/subscriptions","organizations_url":"https://api.github.com/users/geoand/orgs","repos_url":"https://api.github.com/users/geoand/repos","events_url":"https://api.github.com/users/geoand/events{/privacy}","received_events_url":"https://api.github.com/users/geoand/received_events","type":"User","site_admin":false},"body":"You can replace the `@Bean` method with the following code:\r\n\r\n```java\r\n  @Autowired\r\n  private Tracer tracer;\r\n\r\n  @PostConstruct\r\n  public void setupAppender() {\r\n      SpanLogsAppender spanLogsAppender = new SpanLogsAppender(tracer);\r\n      Logger rootLogger = getRootLogger();\r\n      rootLogger.addAppender(spanLogsAppender);\r\n  }\r\n```\r\nThe effect is exactly the same as far as logging and avoid adding the Appender to the Spring Application Context","created_at":"2018-02-16T15:36:18Z","updated_at":"2018-02-16T15:36:18Z","html_url":"https://github.com/opentracing-contrib/java-spring-cloud/pull/97#discussion_r168789405","pull_request_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls/97","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls/comments/168789405"},"html":{"href":"https://github.com/opentracing-contrib/java-spring-cloud/pull/97#discussion_r168789405"},"pull_request":{"href":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls/97"}},"in_reply_to_id":168778689},"pull_request":{"url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls/97","id":169635430,"html_url":"https://github.com/opentracing-contrib/java-spring-cloud/pull/97","diff_url":"https://github.com/opentracing-contrib/java-spring-cloud/pull/97.diff","patch_url":"https://github.com/opentracing-contrib/java-spring-cloud/pull/97.patch","issue_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/issues/97","number":97,"state":"open","locked":false,"title":"Put standard logging to span logs","user":{"login":"pavolloffay","id":5618424,"avatar_url":"https://avatars0.githubusercontent.com/u/5618424?v=4","gravatar_id":"","url":"https://api.github.com/users/pavolloffay","html_url":"https://github.com/pavolloffay","followers_url":"https://api.github.com/users/pavolloffay/followers","following_url":"https://api.github.com/users/pavolloffay/following{/other_user}","gists_url":"https://api.github.com/users/pavolloffay/gists{/gist_id}","starred_url":"https://api.github.com/users/pavolloffay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavolloffay/subscriptions","organizations_url":"https://api.github.com/users/pavolloffay/orgs","repos_url":"https://api.github.com/users/pavolloffay/repos","events_url":"https://api.github.com/users/pavolloffay/events{/privacy}","received_events_url":"https://api.github.com/users/pavolloffay/received_events","type":"User","site_admin":false},"body":"Partially fixes #92 ","created_at":"2018-02-16T14:20:35Z","updated_at":"2018-02-16T15:36:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"093aa87e5387749f2dd8c522c0d275c4e6a2403c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"gytis","id":196395,"avatar_url":"https://avatars0.githubusercontent.com/u/196395?v=4","gravatar_id":"","url":"https://api.github.com/users/gytis","html_url":"https://github.com/gytis","followers_url":"https://api.github.com/users/gytis/followers","following_url":"https://api.github.com/users/gytis/following{/other_user}","gists_url":"https://api.github.com/users/gytis/gists{/gist_id}","starred_url":"https://api.github.com/users/gytis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gytis/subscriptions","organizations_url":"https://api.github.com/users/gytis/orgs","repos_url":"https://api.github.com/users/gytis/repos","events_url":"https://api.github.com/users/gytis/events{/privacy}","received_events_url":"https://api.github.com/users/gytis/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls/97/commits","review_comments_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls/97/comments","review_comment_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/issues/97/comments","statuses_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/statuses/9faebf06a446b120657f3f05b6963cd9ea3a4cef","head":{"label":"pavolloffay:redirect-logging","ref":"redirect-logging","sha":"9faebf06a446b120657f3f05b6963cd9ea3a4cef","user":{"login":"pavolloffay","id":5618424,"avatar_url":"https://avatars0.githubusercontent.com/u/5618424?v=4","gravatar_id":"","url":"https://api.github.com/users/pavolloffay","html_url":"https://github.com/pavolloffay","followers_url":"https://api.github.com/users/pavolloffay/followers","following_url":"https://api.github.com/users/pavolloffay/following{/other_user}","gists_url":"https://api.github.com/users/pavolloffay/gists{/gist_id}","starred_url":"https://api.github.com/users/pavolloffay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavolloffay/subscriptions","organizations_url":"https://api.github.com/users/pavolloffay/orgs","repos_url":"https://api.github.com/users/pavolloffay/repos","events_url":"https://api.github.com/users/pavolloffay/events{/privacy}","received_events_url":"https://api.github.com/users/pavolloffay/received_events","type":"User","site_admin":false},"repo":{"id":96905455,"name":"java-spring-cloud","full_name":"pavolloffay/java-spring-cloud","owner":{"login":"pavolloffay","id":5618424,"avatar_url":"https://avatars0.githubusercontent.com/u/5618424?v=4","gravatar_id":"","url":"https://api.github.com/users/pavolloffay","html_url":"https://github.com/pavolloffay","followers_url":"https://api.github.com/users/pavolloffay/followers","following_url":"https://api.github.com/users/pavolloffay/following{/other_user}","gists_url":"https://api.github.com/users/pavolloffay/gists{/gist_id}","starred_url":"https://api.github.com/users/pavolloffay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavolloffay/subscriptions","organizations_url":"https://api.github.com/users/pavolloffay/orgs","repos_url":"https://api.github.com/users/pavolloffay/repos","events_url":"https://api.github.com/users/pavolloffay/events{/privacy}","received_events_url":"https://api.github.com/users/pavolloffay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pavolloffay/java-spring-cloud","description":"OpenTracing Spring Cloud Instrumentation","fork":true,"url":"https://api.github.com/repos/pavolloffay/java-spring-cloud","forks_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/forks","keys_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/teams","hooks_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/hooks","issue_events_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/issues/events{/number}","events_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/events","assignees_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/assignees{/user}","branches_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/branches{/branch}","tags_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/tags","blobs_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/statuses/{sha}","languages_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/languages","stargazers_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/stargazers","contributors_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/contributors","subscribers_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/subscribers","subscription_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/subscription","commits_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/contents/{+path}","compare_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/merges","archive_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/downloads","issues_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/issues{/number}","pulls_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/pulls{/number}","milestones_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/milestones{/number}","notifications_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/labels{/name}","releases_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/releases{/id}","deployments_url":"https://api.github.com/repos/pavolloffay/java-spring-cloud/deployments","created_at":"2017-07-11T14:57:00Z","updated_at":"2017-08-28T11:04:58Z","pushed_at":"2018-02-16T14:47:36Z","git_url":"git://github.com/pavolloffay/java-spring-cloud.git","ssh_url":"git@github.com:pavolloffay/java-spring-cloud.git","clone_url":"https://github.com/pavolloffay/java-spring-cloud.git","svn_url":"https://github.com/pavolloffay/java-spring-cloud","homepage":null,"size":356,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opentracing-contrib:master","ref":"master","sha":"f998244db149a8ecde2763d3df9f11ac6dc1776f","user":{"login":"opentracing-contrib","id":20525934,"avatar_url":"https://avatars0.githubusercontent.com/u/20525934?v=4","gravatar_id":"","url":"https://api.github.com/users/opentracing-contrib","html_url":"https://github.com/opentracing-contrib","followers_url":"https://api.github.com/users/opentracing-contrib/followers","following_url":"https://api.github.com/users/opentracing-contrib/following{/other_user}","gists_url":"https://api.github.com/users/opentracing-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/opentracing-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentracing-contrib/subscriptions","organizations_url":"https://api.github.com/users/opentracing-contrib/orgs","repos_url":"https://api.github.com/users/opentracing-contrib/repos","events_url":"https://api.github.com/users/opentracing-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/opentracing-contrib/received_events","type":"Organization","site_admin":false},"repo":{"id":96905440,"name":"java-spring-cloud","full_name":"opentracing-contrib/java-spring-cloud","owner":{"login":"opentracing-contrib","id":20525934,"avatar_url":"https://avatars0.githubusercontent.com/u/20525934?v=4","gravatar_id":"","url":"https://api.github.com/users/opentracing-contrib","html_url":"https://github.com/opentracing-contrib","followers_url":"https://api.github.com/users/opentracing-contrib/followers","following_url":"https://api.github.com/users/opentracing-contrib/following{/other_user}","gists_url":"https://api.github.com/users/opentracing-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/opentracing-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opentracing-contrib/subscriptions","organizations_url":"https://api.github.com/users/opentracing-contrib/orgs","repos_url":"https://api.github.com/users/opentracing-contrib/repos","events_url":"https://api.github.com/users/opentracing-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/opentracing-contrib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opentracing-contrib/java-spring-cloud","description":"Distributed tracing for Spring Cloud and Spring Boot","fork":false,"url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud","forks_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/forks","keys_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/teams","hooks_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/hooks","issue_events_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/issues/events{/number}","events_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/events","assignees_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/assignees{/user}","branches_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/branches{/branch}","tags_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/tags","blobs_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/statuses/{sha}","languages_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/languages","stargazers_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/stargazers","contributors_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/contributors","subscribers_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/subscribers","subscription_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/subscription","commits_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/contents/{+path}","compare_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/merges","archive_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/downloads","issues_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/issues{/number}","pulls_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls{/number}","milestones_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/milestones{/number}","notifications_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/labels{/name}","releases_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/releases{/id}","deployments_url":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/deployments","created_at":"2017-07-11T14:56:50Z","updated_at":"2018-02-16T14:35:56Z","pushed_at":"2018-02-16T14:47:37Z","git_url":"git://github.com/opentracing-contrib/java-spring-cloud.git","ssh_url":"git@github.com:opentracing-contrib/java-spring-cloud.git","clone_url":"https://github.com/opentracing-contrib/java-spring-cloud.git","svn_url":"https://github.com/opentracing-contrib/java-spring-cloud","homepage":"","size":250,"stargazers_count":26,"watchers_count":26,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":15,"open_issues":15,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls/97"},"html":{"href":"https://github.com/opentracing-contrib/java-spring-cloud/pull/97"},"issue":{"href":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/issues/97"},"comments":{"href":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/issues/97/comments"},"review_comments":{"href":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls/97/comments"},"review_comment":{"href":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/pulls/97/commits"},"statuses":{"href":"https://api.github.com/repos/opentracing-contrib/java-spring-cloud/statuses/9faebf06a446b120657f3f05b6963cd9ea3a4cef"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"geoand"}}