{"action":"created","issue":{"url":"https://api.github.com/repos/ratpack/ratpack/issues/551","labels_url":"https://api.github.com/repos/ratpack/ratpack/issues/551/labels{/name}","comments_url":"https://api.github.com/repos/ratpack/ratpack/issues/551/comments","events_url":"https://api.github.com/repos/ratpack/ratpack/issues/551/events","html_url":"https://github.com/ratpack/ratpack/issues/551","id":54393679,"number":551,"title":"Add support for Slfj MDC support","user":{"login":"alkemist","id":17825,"avatar_url":"https://avatars.githubusercontent.com/u/17825?v=3","gravatar_id":"","url":"https://api.github.com/users/alkemist","html_url":"https://github.com/alkemist","followers_url":"https://api.github.com/users/alkemist/followers","following_url":"https://api.github.com/users/alkemist/following{/other_user}","gists_url":"https://api.github.com/users/alkemist/gists{/gist_id}","starred_url":"https://api.github.com/users/alkemist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alkemist/subscriptions","organizations_url":"https://api.github.com/users/alkemist/orgs","repos_url":"https://api.github.com/users/alkemist/repos","events_url":"https://api.github.com/users/alkemist/events{/privacy}","received_events_url":"https://api.github.com/users/alkemist/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ratpack/ratpack/labels/good-first-contrib","name":"good-first-contrib","color":"00c5fe"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-14T23:42:22Z","updated_at":"2015-02-23T23:05:01Z","closed_at":null,"body":"See MDC section of http://www.slf4j.org/manual.html\r\n\r\nFor us to support this, we'd need to manage swapping out thread bound MDCs as executions acquire a thread. This could be done quite easily with an ExecInterceptor implementation.\r\n\r\nSomewhat dependent on #550"},"comment":{"url":"https://api.github.com/repos/ratpack/ratpack/issues/comments/75657548","html_url":"https://github.com/ratpack/ratpack/issues/551#issuecomment-75657548","issue_url":"https://api.github.com/repos/ratpack/ratpack/issues/551","id":75657548,"user":{"login":"zedar","id":173854,"avatar_url":"https://avatars.githubusercontent.com/u/173854?v=3","gravatar_id":"","url":"https://api.github.com/users/zedar","html_url":"https://github.com/zedar","followers_url":"https://api.github.com/users/zedar/followers","following_url":"https://api.github.com/users/zedar/following{/other_user}","gists_url":"https://api.github.com/users/zedar/gists{/gist_id}","starred_url":"https://api.github.com/users/zedar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zedar/subscriptions","organizations_url":"https://api.github.com/users/zedar/orgs","repos_url":"https://api.github.com/users/zedar/repos","events_url":"https://api.github.com/users/zedar/events{/privacy}","received_events_url":"https://api.github.com/users/zedar/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T23:05:01Z","updated_at":"2015-02-23T23:05:01Z","body":"MDC has private constructur and no method to change static ```mdcAdapter``` field. So I think it is not possible to overwrite it. I will add some stubbing classes to simulate logging factory.\r\n\r\nI've got another question. Once we start new execution, do you expect that MDC entries as passed from previous continuation (I mean from block \"1\")? \r\n\r\n    // 1\r\n    MDC.put(\"value\", \"foo1\")\r\n    promise { f ->\r\n      execController.control.exec().start {\r\n        // 2\r\n        values << MDC.get(\"value\")\r\n         f.success(\"foo1\")\r\n       }\r\n     }\r\n\r\nCorrect me if I'm wrong but block \"2\" is not intercepted, so if logging factory uses ```ThreadLocal``` (like log4j in default configuration) and not ```InheritableThreadLocal``` (like java.util.logging) then block \"2\" will not see \"value\" in MDC context.\r\n\r\n"}}