{"action":"created","issue":{"url":"https://api.github.com/repos/dropwizard/dropwizard/issues/881","labels_url":"https://api.github.com/repos/dropwizard/dropwizard/issues/881/labels{/name}","comments_url":"https://api.github.com/repos/dropwizard/dropwizard/issues/881/comments","events_url":"https://api.github.com/repos/dropwizard/dropwizard/issues/881/events","html_url":"https://github.com/dropwizard/dropwizard/pull/881","id":58048226,"number":881,"title":"Print error messages (if any) when initializing loggers","user":{"login":"eiden","id":1861671,"avatar_url":"https://avatars.githubusercontent.com/u/1861671?v=3","gravatar_id":"","url":"https://api.github.com/users/eiden","html_url":"https://github.com/eiden","followers_url":"https://api.github.com/users/eiden/followers","following_url":"https://api.github.com/users/eiden/following{/other_user}","gists_url":"https://api.github.com/users/eiden/gists{/gist_id}","starred_url":"https://api.github.com/users/eiden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eiden/subscriptions","organizations_url":"https://api.github.com/users/eiden/orgs","repos_url":"https://api.github.com/users/eiden/repos","events_url":"https://api.github.com/users/eiden/events{/privacy}","received_events_url":"https://api.github.com/users/eiden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-18T10:05:49Z","updated_at":"2015-02-21T23:18:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dropwizard/dropwizard/pulls/881","html_url":"https://github.com/dropwizard/dropwizard/pull/881","diff_url":"https://github.com/dropwizard/dropwizard/pull/881.diff","patch_url":"https://github.com/dropwizard/dropwizard/pull/881.patch"},"body":"A couple of days ago, I spent a ridiculous amount of time tracking down a relatively stupid issue. \r\n\r\nTurned out that I had messed up write permission in my log directly. So the file appender\r\ncouldn't write to my configured log directory.\r\n\r\nMy own fault, I know. But I got no warning when I started up the application. \r\n\r\nSo, I'm proposing a change :)\r\n\r\nIn `LoggingFactory#configure`, after the appenders are set up, logback's `StatusPrinter#printIfErrorsOccured` is called. If any errors has occurred, those are printed to `System.out`. \r\n\r\nI'm not sure if printing to `System.out` is smart, perhaps we should print to `System.err` instead? Printing to `System.out` could interfere with output from other commands.\r\n\r\nExample of an error message:\r\n```\r\n10:51:26,122 |-ERROR in ch.qos.logback.core.FileAppender[file-appender] - openFile(/var/folders/p7/81qg63wn2p14k0kgpk5_wz8m0000gn/T/junit888714839740087763/folder-without-write-permission/my-log-file.log,true) call failed. java.io.FileNotFoundException: /var/folders/p7/81qg63wn2p14k0kgpk5_wz8m0000gn/T/junit888714839740087763/folder-without-write-permission/my-log-file.log (Permission denied)\r\n\tat java.io.FileNotFoundException: /var/folders/p7/81qg63wn2p14k0kgpk5_wz8m0000gn/T/junit888714839740087763/folder-without-write-permission/my-log-file.log (Permission denied)\r\n\tat \tat java.io.FileOutputStream.open(Native Method)\r\n\tat \tat java.io.FileOutputStream.<init>(FileOutputStream.java:221)\r\n\tat \tat ch.qos.logback.core.recovery.ResilientFileOutputStream.<init>(ResilientFileOutputStream.java:28)\r\n\tat \tat ch.qos.logback.core.FileAppender.openFile(FileAppender.java:150)\r\n\tat \tat ch.qos.logback.core.FileAppender.start(FileAppender.java:108)\r\n\tat \tat io.dropwizard.logging.FileAppenderFactory.build(FileAppenderFactory.java:168)\r\n\tat \tat io.dropwizard.logging.LoggingFactory.configure(LoggingFactory.java:126)\r\n\tat \tat io.dropwizard.logging.LoggingFactoryPrintErrorMessagesTest.configureAndCaptureSystemOut(LoggingFactoryPrintErrorMessagesTest.java:66)\r\n\tat \tat io.dropwizard.logging.LoggingFactoryPrintErrorMessagesTest.testWhenFileAppenderDoesNotHaveWritePermissionToFolder_PrintsErrorMessageToConsole(LoggingFactoryPrintErrorMessagesTest.java:79)\r\n\tat \tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat \tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\n\tat \tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat \tat java.lang.reflect.Method.invoke(Method.java:606)\r\n\t[...]\r\n```"},"comment":{"url":"https://api.github.com/repos/dropwizard/dropwizard/issues/comments/75398795","html_url":"https://github.com/dropwizard/dropwizard/pull/881#issuecomment-75398795","issue_url":"https://api.github.com/repos/dropwizard/dropwizard/issues/881","id":75398795,"user":{"login":"eiden","id":1861671,"avatar_url":"https://avatars.githubusercontent.com/u/1861671?v=3","gravatar_id":"","url":"https://api.github.com/users/eiden","html_url":"https://github.com/eiden","followers_url":"https://api.github.com/users/eiden/followers","following_url":"https://api.github.com/users/eiden/following{/other_user}","gists_url":"https://api.github.com/users/eiden/gists{/gist_id}","starred_url":"https://api.github.com/users/eiden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eiden/subscriptions","organizations_url":"https://api.github.com/users/eiden/orgs","repos_url":"https://api.github.com/users/eiden/repos","events_url":"https://api.github.com/users/eiden/events{/privacy}","received_events_url":"https://api.github.com/users/eiden/received_events","type":"User","site_admin":false},"created_at":"2015-02-21T23:18:01Z","updated_at":"2015-02-21T23:18:01Z","body":"@arteam, I have made some changes to address the issues you pointed out. I've also added a three new tests. Let me know if I should squash the commits. "}}