public DefaultLoggingManager stop() { try { CompositeStoppable.stoppable( loggingSystem, javaUtilLoggingSystem, stdOutLoggingSystem, stdErrLoggingSystem) .stop(); for (StandardOutputListener stdoutListener : stdoutListeners) { loggingOutput.removeStandardOutputListener(stdoutListener); } for (StandardOutputListener stderrListener : stderrListeners) { loggingOutput.removeStandardErrorListener(stderrListener); } for (OutputEventListener listener : outputEventListeners) { loggingOutput.removeOutputEventListener(listener); } } finally { started = false; } return this; }
public void removeStandardErrorListener(StandardOutputListener listener) { if (stderrListeners.remove(listener) && started) { loggingOutput.removeStandardErrorListener(listener); } }