{"action":"created","issue":{"url":"https://api.github.com/repos/typesafehub/scala-logging/issues/40","repository_url":"https://api.github.com/repos/typesafehub/scala-logging","labels_url":"https://api.github.com/repos/typesafehub/scala-logging/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/typesafehub/scala-logging/issues/40/comments","events_url":"https://api.github.com/repos/typesafehub/scala-logging/issues/40/events","html_url":"https://github.com/typesafehub/scala-logging/issues/40","id":93387695,"number":40,"title":"Examples of unit testing components that use Strict/LazyLogging","user":{"login":"Johnlon","id":836248,"avatar_url":"https://avatars.githubusercontent.com/u/836248?v=3","gravatar_id":"","url":"https://api.github.com/users/Johnlon","html_url":"https://github.com/Johnlon","followers_url":"https://api.github.com/users/Johnlon/followers","following_url":"https://api.github.com/users/Johnlon/following{/other_user}","gists_url":"https://api.github.com/users/Johnlon/gists{/gist_id}","starred_url":"https://api.github.com/users/Johnlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Johnlon/subscriptions","organizations_url":"https://api.github.com/users/Johnlon/orgs","repos_url":"https://api.github.com/users/Johnlon/repos","events_url":"https://api.github.com/users/Johnlon/events{/privacy}","received_events_url":"https://api.github.com/users/Johnlon/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-06T22:06:01Z","updated_at":"2016-05-23T21:12:55Z","closed_at":"2016-05-23T21:12:55Z","body":"I have components where I want to unit test their logging side effects.\r\n\r\nIt would be good if the documentation demonstrated the recommended patterns for testing the logging of code that uses Strict/LazyLogging - apologies if I have missed this.\r\n\r\nFor now .. It would seem that the two traits require me to leave my classes non-final and override the method defined in the trait - is this the recommendation? Can you confirm if there is a more elegant approach and/or one where I can retain final classes.\r\n"},"comment":{"url":"https://api.github.com/repos/typesafehub/scala-logging/issues/comments/221097869","html_url":"https://github.com/typesafehub/scala-logging/issues/40#issuecomment-221097869","issue_url":"https://api.github.com/repos/typesafehub/scala-logging/issues/40","id":221097869,"user":{"login":"Johnlon","id":836248,"avatar_url":"https://avatars.githubusercontent.com/u/836248?v=3","gravatar_id":"","url":"https://api.github.com/users/Johnlon","html_url":"https://github.com/Johnlon","followers_url":"https://api.github.com/users/Johnlon/followers","following_url":"https://api.github.com/users/Johnlon/following{/other_user}","gists_url":"https://api.github.com/users/Johnlon/gists{/gist_id}","starred_url":"https://api.github.com/users/Johnlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Johnlon/subscriptions","organizations_url":"https://api.github.com/users/Johnlon/orgs","repos_url":"https://api.github.com/users/Johnlon/repos","events_url":"https://api.github.com/users/Johnlon/events{/privacy}","received_events_url":"https://api.github.com/users/Johnlon/received_events","type":"User","site_admin":false},"created_at":"2016-05-23T21:12:55Z","updated_at":"2016-05-23T21:12:55Z","body":"Some time later ....\r\nI think in the end the only pattern that really works well is DI of the ILoggerFactory.\r\nAllows tests as \r\n\r\n"}}
{"actor":{"display_login":"Johnlon"}}