diff --git a/ansi/src/main/java/de/staropensource/sosengine/ansi/AnsiSubsystem.java b/ansi/src/main/java/de/staropensource/sosengine/ansi/AnsiSubsystem.java index 74e860f3..97c3a874 100644 --- a/ansi/src/main/java/de/staropensource/sosengine/ansi/AnsiSubsystem.java +++ b/ansi/src/main/java/de/staropensource/sosengine/ansi/AnsiSubsystem.java @@ -71,7 +71,7 @@ public final class AnsiSubsystem extends SubsystemClass { /** {@inheritDoc} */ @Override public void initializeSubsystem() { - Logger.setLoggerImplementation(new AnsiLoggingAdapter()); + Logger.setLoggingAdapter(new AnsiLoggingAdapter()); } /** {@inheritDoc} */ diff --git a/base/src/main/java/de/staropensource/sosengine/base/implementable/LoggingAdapter.java b/base/src/main/java/de/staropensource/sosengine/base/implementable/LoggingAdapter.java index ec7d6fb2..3053545d 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/implementable/LoggingAdapter.java +++ b/base/src/main/java/de/staropensource/sosengine/base/implementable/LoggingAdapter.java @@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable; /** * Interface for implementing custom logger implementations. * - * @see Logger#setLoggerImplementation(LoggingAdapter) + * @see Logger#setLoggingAdapter(LoggingAdapter) * @since v1-alpha0 */ public interface LoggingAdapter { diff --git a/base/src/main/java/de/staropensource/sosengine/base/logging/CrashHandler.java b/base/src/main/java/de/staropensource/sosengine/base/logging/CrashHandler.java index c09f829d..584970b9 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/logging/CrashHandler.java +++ b/base/src/main/java/de/staropensource/sosengine/base/logging/CrashHandler.java @@ -133,8 +133,8 @@ Dear developer: FIX YOUR GODDAMN SHIT! Please check if your code or 3rd party su .replace("%content%", processCrashContent()) .replace("%handled%", throwableHandled ? "!!! This throwable is declared as handled and has been passed down the execution chain !!!" : ""); - // Invoke LoggerImpl#prePlaceholder - String temp = Logger.getLoggerImplementation().prePlaceholder(LogLevel.CRASH, issuerClass, issuerOrigin, issuerMetadata, message, base); + // Invoke LoggingAdapter#prePlaceholder + String temp = Logger.getLoggingAdapter().prePlaceholder(LogLevel.CRASH, issuerClass, issuerOrigin, issuerMetadata, message, base); if (temp != null) base = temp; @@ -155,12 +155,12 @@ Dear developer: FIX YOUR GODDAMN SHIT! Please check if your code or 3rd party su // Replace placeholders base = PlaceholderEngine.getInstance().process(base, temporaryPlaceholders); - // Invoke LoggerImpl#postPlaceholder - base = Logger.getLoggerImplementation().postPlaceholder(LogLevel.CRASH, issuerClass, issuerOrigin, issuerMetadata, message, base); + // Invoke LoggingAdapter#postPlaceholder + base = Logger.getLoggingAdapter().postPlaceholder(LogLevel.CRASH, issuerClass, issuerOrigin, issuerMetadata, message, base); - // Print log message by invoking LoggerImpl#print + // Print log message by invoking LoggingAdapter#print Logger.flushLogMessages(); - Logger.getLoggerImplementation().print(LogLevel.CRASH, issuerClass, issuerOrigin, issuerMetadata, message, base); + Logger.getLoggingAdapter().print(LogLevel.CRASH, issuerClass, issuerOrigin, issuerMetadata, message, base); // Emit event if (throwableHandled) diff --git a/base/src/main/java/de/staropensource/sosengine/base/logging/InitLogger.java b/base/src/main/java/de/staropensource/sosengine/base/logging/InitLogger.java index 12dece50..25e5f1b7 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/logging/InitLogger.java +++ b/base/src/main/java/de/staropensource/sosengine/base/logging/InitLogger.java @@ -60,8 +60,8 @@ public final class InitLogger { if (level.compareTo(EngineConfiguration.getInstance().getLoggerLevel()) < 0) return; - // Invoke LoggerImpl#prePlaceholder - String base = Logger.getLoggerImplementation().prePlaceholder(level, issuerClass, issuerOrigin, issuerMetadata, message, template); + // Invoke LoggingAdapter#prePlaceholder + String base = Logger.getLoggingAdapter().prePlaceholder(level, issuerClass, issuerOrigin, issuerMetadata, message, template); if (base == null) base = template; @@ -71,11 +71,11 @@ public final class InitLogger { base = new LogPath(issuerClass).replace(base); base = base.replace("%log_message%", message.replace("\n", "")); - // Invoke LoggerImpl#postPlaceholder - base = Logger.getLoggerImplementation().postPlaceholder(level, issuerClass, issuerOrigin, issuerMetadata, message, base); + // Invoke LoggingAdapter#postPlaceholder + base = Logger.getLoggingAdapter().postPlaceholder(level, issuerClass, issuerOrigin, issuerMetadata, message, base); - // Print log message by invoking LoggerImpl#print - Logger.getLoggerImplementation().print(level, issuerClass, issuerOrigin, issuerMetadata, message, base); + // Print log message by invoking LoggingAdapter#print + Logger.getLoggingAdapter().print(level, issuerClass, issuerOrigin, issuerMetadata, message, base); } /** diff --git a/base/src/main/java/de/staropensource/sosengine/base/logging/Logger.java b/base/src/main/java/de/staropensource/sosengine/base/logging/Logger.java index fe80a043..15856da9 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/logging/Logger.java +++ b/base/src/main/java/de/staropensource/sosengine/base/logging/Logger.java @@ -88,13 +88,13 @@ public final class Logger { * -- SETTER -- * Sets the active {@link LoggingAdapter}. * - * @param loggerImplementation new active {@link LoggingAdapter} + * @param loggingAdapter new active {@link LoggingAdapter} * @see LoggingAdapter * @since v1-alpha0 */ @Getter @Setter - private static @NotNull LoggingAdapter loggerImplementation = new PlainLoggingAdapter(); + private static @NotNull LoggingAdapter loggingAdapter = new PlainLoggingAdapter(); /** * Contains all active {@link LogRule}s. @@ -195,8 +195,8 @@ public final class Logger { } } - // Invoke LoggerImpl#prePlaceholder - String format = loggerImplementation.prePlaceholder(level, issuerClass, issuerOrigin, issuerMetadata, message, EngineConfiguration.getInstance().getLoggerTemplate()); + // Invoke LoggingAdapter#prePlaceholder + String format = loggingAdapter.prePlaceholder(level, issuerClass, issuerOrigin, issuerMetadata, message, EngineConfiguration.getInstance().getLoggerTemplate()); if (format == null) format = EngineConfiguration.getInstance().getLoggerTemplate(); @@ -262,16 +262,16 @@ public final class Logger { // Replace placeholders using PlaceholderEngine again format = PlaceholderEngine.getInstance().process(format); - // Invoke LoggerImpl#postPlaceholder - format = loggerImplementation.postPlaceholder(level, issuerClass, issuerOrigin, issuerMetadata, message, format); + // Invoke LoggingAdapter#postPlaceholder + format = loggingAdapter.postPlaceholder(level, issuerClass, issuerOrigin, issuerMetadata, message, format); // Call event if (!(issuerClass.getName().equals("de.staropensource.sosengine.slf4j_compat.CompatibilityLogger") || issuerClass.equals(EventHelper.class))) new LogEvent().callEvent(level, issuerClass, issuerOrigin, issuerMetadata, message); - // Print log message by invoking LoggerImpl#print - loggerImplementation.print(level, issuerClass, issuerOrigin, issuerMetadata, message, format); + // Print log message by invoking LoggingAdapter#print + loggingAdapter.print(level, issuerClass, issuerOrigin, issuerMetadata, message, format); } /**