From e142308112a266e675a53d9631a40fd2ef873346 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Thu, 27 Aug 2020 01:33:28 -0700 Subject: [PATCH] Added Logger#fatal* methods --- core/src/com/riiablo/logger/AbstractLogger.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/src/com/riiablo/logger/AbstractLogger.java b/core/src/com/riiablo/logger/AbstractLogger.java index 37735b78..4fda8c95 100644 --- a/core/src/com/riiablo/logger/AbstractLogger.java +++ b/core/src/com/riiablo/logger/AbstractLogger.java @@ -97,6 +97,18 @@ abstract class AbstractLogger { logIfEnabled(Level.ERROR, formattedFactory().newMessage(message, params), getLocation()); } + public final boolean fatalEnabled() { + return enabled(Level.FATAL); + } + + public final void fatal(final String message, final Object... params) { + logIfEnabled(Level.FATAL, defaultFactory().newMessage(message, params), getLocation()); + } + + public final void fatalf(final String message, final Object... params) { + logIfEnabled(Level.FATAL, formattedFactory().newMessage(message, params), getLocation()); + } + private StackTraceElement getLocation() { return getLocation(FQCN); }