From e376e36eb30607fde988d93a82582ea860235303 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Thu, 11 Jul 2024 05:28:34 +0200 Subject: [PATCH] Rename message -> format for LoggerImpl --- .../sosengine/base/classes/logging/LoggerImpl.java | 10 +++++----- .../logging/implementation/ColoredLoggerImpl.java | 8 ++++---- .../logging/implementation/PlainLoggerImpl.java | 14 +++++++------- .../base/logging/implementation/RawLoggerImpl.java | 12 ++++++------ 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/base/src/main/java/de/staropensource/sosengine/base/classes/logging/LoggerImpl.java b/base/src/main/java/de/staropensource/sosengine/base/classes/logging/LoggerImpl.java index 27034532..b94c88e7 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/classes/logging/LoggerImpl.java +++ b/base/src/main/java/de/staropensource/sosengine/base/classes/logging/LoggerImpl.java @@ -46,20 +46,20 @@ public interface LoggerImpl { * * @param level log level * @param logIssuer log issuer - * @param message log message - * @return new log message + * @param format log format + * @return new log format * @since 1-alpha0 */ @NotNull - String postPlaceholder(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String message); + String postPlaceholder(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String format); /** * Responsible for printing the finalized log message. * * @param level log level * @param logIssuer log issuer - * @param message finalized log message + * @param format finalized log format * @since 1-alpha0 */ - void print(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String message); + void print(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String format); } diff --git a/base/src/main/java/de/staropensource/sosengine/base/logging/implementation/ColoredLoggerImpl.java b/base/src/main/java/de/staropensource/sosengine/base/logging/implementation/ColoredLoggerImpl.java index 2761b47a..150305f4 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/logging/implementation/ColoredLoggerImpl.java +++ b/base/src/main/java/de/staropensource/sosengine/base/logging/implementation/ColoredLoggerImpl.java @@ -56,17 +56,17 @@ public class ColoredLoggerImpl implements LoggerImpl { /** {@inheritDoc} */ @NotNull @Override - public String postPlaceholder(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String message) { + public String postPlaceholder(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String format) { // No modifications necessary - return message; + return format; } /** {@inheritDoc} */ @SuppressWarnings({ "resource" }) // Using try-with-resources will cause issues here @Override - public void print(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String message) { + public void print(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String format) { // Convert to Ansi - Ansi output = new AnsiShortcodeConverter(message).getAnsi(); + Ansi output = new AnsiShortcodeConverter(format).getAnsi(); // Print message if (level == LogLevel.ERROR || level == LogLevel.CRASH) diff --git a/base/src/main/java/de/staropensource/sosengine/base/logging/implementation/PlainLoggerImpl.java b/base/src/main/java/de/staropensource/sosengine/base/logging/implementation/PlainLoggerImpl.java index 380187dd..af09f372 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/logging/implementation/PlainLoggerImpl.java +++ b/base/src/main/java/de/staropensource/sosengine/base/logging/implementation/PlainLoggerImpl.java @@ -54,21 +54,21 @@ public class PlainLoggerImpl implements LoggerImpl { /** {@inheritDoc} */ @NotNull @Override - public String postPlaceholder(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String message) { + public String postPlaceholder(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String format) { // No modifications necessary - return message; + return format; } /** {@inheritDoc} */ @Override - public void print(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String message) { - message = new EmptyShortcodeConverter(message).getClean(); + public void print(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String format) { + format = new EmptyShortcodeConverter(format).getClean(); if (level == LogLevel.ERROR || level == LogLevel.CRASH) if (EngineConfiguration.getInstance().isLoggerForceStandardOutput()) - System.out.println(message); + System.out.println(format); else - System.err.println(message); + System.err.println(format); else - System.out.println(message); + System.out.println(format); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/logging/implementation/RawLoggerImpl.java b/base/src/main/java/de/staropensource/sosengine/base/logging/implementation/RawLoggerImpl.java index 8a80de34..6f9c66cf 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/logging/implementation/RawLoggerImpl.java +++ b/base/src/main/java/de/staropensource/sosengine/base/logging/implementation/RawLoggerImpl.java @@ -54,20 +54,20 @@ public class RawLoggerImpl implements LoggerImpl { /** {@inheritDoc} */ @NotNull @Override - public String postPlaceholder(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String message) { + public String postPlaceholder(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String format) { // No modifications necessary - return message; + return format; } /** {@inheritDoc} */ @Override - public void print(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String message) { + public void print(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String format) { if (level == LogLevel.ERROR || level == LogLevel.CRASH) if (EngineConfiguration.getInstance().isLoggerForceStandardOutput()) - System.out.println(message); + System.out.println(format); else - System.err.println(message); + System.err.println(format); else - System.out.println(message); + System.out.println(format); } }