use of org.graylog2.system.shutdown.GracefulShutdownHook in project graylog2-server by Graylog2.
the class OutputSetupService method shutDownRunningOutputs.
private void shutDownRunningOutputs() {
for (MessageOutput output : outputRegistry.getMessageOutputs()) {
// Do not execute the stop() method for Outputs that implement the GracefulShutdown mechanism.
if (output instanceof GracefulShutdownHook) {
continue;
}
try {
// TODO: change to debug
LOG.info("Stopping output {}", output.getClass().getName());
output.stop();
} catch (Exception e) {
LOG.error("Error stopping output", e);
}
}
}
Aggregations