{"action":"created","issue":{"url":"https://api.github.com/repos/druid-io/druid/issues/1387","labels_url":"https://api.github.com/repos/druid-io/druid/issues/1387/labels{/name}","comments_url":"https://api.github.com/repos/druid-io/druid/issues/1387/comments","events_url":"https://api.github.com/repos/druid-io/druid/issues/1387/events","html_url":"https://github.com/druid-io/druid/pull/1387","id":79646787,"number":1387,"title":"Add special handler to allow logger messages during shutdown","user":{"login":"drcrallen","id":8213081,"avatar_url":"https://avatars.githubusercontent.com/u/8213081?v=3","gravatar_id":"","url":"https://api.github.com/users/drcrallen","html_url":"https://github.com/drcrallen","followers_url":"https://api.github.com/users/drcrallen/followers","following_url":"https://api.github.com/users/drcrallen/following{/other_user}","gists_url":"https://api.github.com/users/drcrallen/gists{/gist_id}","starred_url":"https://api.github.com/users/drcrallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drcrallen/subscriptions","organizations_url":"https://api.github.com/users/drcrallen/orgs","repos_url":"https://api.github.com/users/drcrallen/repos","events_url":"https://api.github.com/users/drcrallen/events{/privacy}","received_events_url":"https://api.github.com/users/drcrallen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-22T23:08:19Z","updated_at":"2015-05-24T02:46:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/druid-io/druid/pulls/1387","html_url":"https://github.com/druid-io/druid/pull/1387","diff_url":"https://github.com/druid-io/druid/pull/1387.diff","patch_url":"https://github.com/druid-io/druid/pull/1387.patch"},"body":"This gets rid of those pesky `FATAL Unable to register shutdown hook because JVM is shutting down.` messages.\r\n\r\nPreviously the shutdown hooks fire essentially at random. This was causing logging messages to regularly be lost during the shutdown cycle if the log4j shutdown hook was fired before some of the ones that use logging in their shutdown messages.\r\n\r\nThis patch (with the appropriate server setting) causes the logger shutdown to fire as the last lifecycle.stop() item.\r\n\r\nOmitting the server property simply reverts to the prior behavior of regularly discarding logger messages during shutdown."},"comment":{"url":"https://api.github.com/repos/druid-io/druid/issues/comments/104971097","html_url":"https://github.com/druid-io/druid/pull/1387#issuecomment-104971097","issue_url":"https://api.github.com/repos/druid-io/druid/issues/1387","id":104971097,"user":{"login":"drcrallen","id":8213081,"avatar_url":"https://avatars.githubusercontent.com/u/8213081?v=3","gravatar_id":"","url":"https://api.github.com/users/drcrallen","html_url":"https://github.com/drcrallen","followers_url":"https://api.github.com/users/drcrallen/followers","following_url":"https://api.github.com/users/drcrallen/following{/other_user}","gists_url":"https://api.github.com/users/drcrallen/gists{/gist_id}","starred_url":"https://api.github.com/users/drcrallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drcrallen/subscriptions","organizations_url":"https://api.github.com/users/drcrallen/orgs","repos_url":"https://api.github.com/users/drcrallen/repos","events_url":"https://api.github.com/users/drcrallen/events{/privacy}","received_events_url":"https://api.github.com/users/drcrallen/received_events","type":"User","site_admin":false},"created_at":"2015-05-24T02:46:39Z","updated_at":"2015-05-24T02:46:39Z","body":"@gianm : The dependency is exactly one java class https://github.com/DjDCH/Log4j-StaticShutdown/blob/master/src/main/java/com/djdch/log4j/StaticShutdownCallbackRegistry.java that we would pretty much have to copy to get the functionality. It is MIT license so direct copy is probably a no-go.\r\n\r\nThe CLI classes pickup `ManageLifecycle` automagically.\r\n\r\nThis will not function at all without the property."}}