use of ch.qos.logback.core.status.ErrorStatus in project swift by luastar.
the class GuiLoggerAppender method start.
@Override
public void start() {
int errors = 0;
if (this.encoder == null) {
addStatus(new ErrorStatus("No encoder set for the appender named \"" + name + "\".", this));
errors++;
}
// only error free appenders should be activated
if (errors == 0) {
super.start();
}
}
use of ch.qos.logback.core.status.ErrorStatus in project dropwizard by dropwizard.
the class ResilientOutputStreamBase method attemptRecovery.
private void attemptRecovery() {
try {
close();
} catch (IOException e) {
// Ignored
}
addStatusIfCountNotOverLimit(new InfoStatus("Attempting to recover from IO failure on " + getDescription(), this));
// subsequent writes must always be in append mode
try {
os = openNewOutputStream();
presumedClean = true;
} catch (IOException e) {
addStatusIfCountNotOverLimit(new ErrorStatus("Failed to open " + getDescription(), this, e));
}
}
use of ch.qos.logback.core.status.ErrorStatus in project dropwizard by dropwizard.
the class ResilientOutputStreamBase method postIOFailure.
private void postIOFailure(IOException e) {
addStatusIfCountNotOverLimit(new ErrorStatus("IO failure while writing to " + getDescription(), this, e));
presumedClean = false;
if (recoveryCoordinator == null) {
recoveryCoordinator = new RecoveryCoordinator();
}
}
Aggregations