Map FATAL level for Log4j

Make sure that Boot's FATAL level is mapped to log4j and log4j2 properly.

Fixes gh-3518
This commit is contained in:
Stephane Nicoll 2015-07-16 17:59:04 +02:00
parent 538c8d04b1
commit d9939a5be2
3 changed files with 3 additions and 2 deletions

View File

@ -912,6 +912,7 @@ The following items are output:
* Logger name -- This is usually the source class name (often abbreviated).
* The log message.
NOTE: Logback does not have a `FATAL` level (it is mapped to `ERROR`)
[[boot-features-logging-console-output]]

View File

@ -49,7 +49,7 @@ public class Log4JLoggingSystem extends Slf4JLoggingSystem {
levels.put(LogLevel.INFO, Level.INFO);
levels.put(LogLevel.WARN, Level.WARN);
levels.put(LogLevel.ERROR, Level.ERROR);
levels.put(LogLevel.FATAL, Level.ERROR);
levels.put(LogLevel.FATAL, Level.FATAL);
levels.put(LogLevel.OFF, Level.OFF);
LEVELS = Collections.unmodifiableMap(levels);
}

View File

@ -64,7 +64,7 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
levels.put(LogLevel.INFO, Level.INFO);
levels.put(LogLevel.WARN, Level.WARN);
levels.put(LogLevel.ERROR, Level.ERROR);
levels.put(LogLevel.FATAL, Level.ERROR);
levels.put(LogLevel.FATAL, Level.FATAL);
levels.put(LogLevel.OFF, Level.OFF);
LEVELS = Collections.unmodifiableMap(levels);
}