Fix logging on immediate exit on start

If elasticsearch was started in the foreground an immediate exit on startup
led to logging in the logfile, where as when starting in the background,
an immediate exit logged to stdout.

Closes #4805
This commit is contained in:
Alexander Reelsen 2014-01-20 14:17:39 +01:00
parent 32428bf683
commit 53dab85fa2
1 changed files with 2 additions and 2 deletions

View File

@ -235,10 +235,10 @@ public class Bootstrap {
}
String errorMessage = buildErrorMessage(stage, e);
if (foreground) {
logger.error(errorMessage);
} else {
System.err.println(errorMessage);
System.err.flush();
} else {
logger.error(errorMessage);
}
Loggers.disableConsoleLogging();
if (logger.isDebugEnabled()) {