Răsfoiți Sursa

Boostrap: Log startup exception to console if needed and to file as error

Closes #6581
Mark J Greene 11 ani în urmă
părinte
comite
d5e813929c

+ 3 - 6
src/main/java/org/elasticsearch/bootstrap/Bootstrap.java

@@ -239,13 +239,10 @@ public class Bootstrap {
             if (foreground) {
                 System.err.println(errorMessage);
                 System.err.flush();
-            } else {
-                logger.error(errorMessage);
-            }
-            Loggers.disableConsoleLogging();
-            if (logger.isDebugEnabled()) {
-                logger.debug("Exception", e);
+                Loggers.disableConsoleLogging();
             }
+            logger.error("Exception", e);
+            
             System.exit(3);
         }
     }