When shutting down, there can be all kinds of exceptions flying around and most of them are not interesting - so I log the stack trace only if the exception message is missing (e.g. NPE) or if DEBUG level is enabled.