From c9bf6126a06374ead3a97f2e2ee7164a0b923402 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Thu, 5 Sep 2024 00:47:04 +0200 Subject: [PATCH] Rename LoggingThread#startLoggingThread method --- .../src/main/java/de/staropensource/sosengine/base/Engine.java | 2 +- .../de/staropensource/sosengine/base/EngineConfiguration.java | 2 +- .../sosengine/base/internal/type/QueuedLogMessage.java | 2 +- .../staropensource/sosengine/base/logging/LoggingThread.java | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/base/src/main/java/de/staropensource/sosengine/base/Engine.java b/base/src/main/java/de/staropensource/sosengine/base/Engine.java index b62c4a69..0ed27512 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/Engine.java +++ b/base/src/main/java/de/staropensource/sosengine/base/Engine.java @@ -344,7 +344,7 @@ public final class Engine extends SubsystemClass { public void startThreads() { logger.diag("Starting threads"); - LoggingThread.startLoggingThread(); + LoggingThread.startThread(); } /** diff --git a/base/src/main/java/de/staropensource/sosengine/base/EngineConfiguration.java b/base/src/main/java/de/staropensource/sosengine/base/EngineConfiguration.java index 4808669a..3a4aa8c5 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/EngineConfiguration.java +++ b/base/src/main/java/de/staropensource/sosengine/base/EngineConfiguration.java @@ -328,7 +328,7 @@ public final class EngineConfiguration extends Configuration { // Start logging thread automatically if (optimizeLogging && Engine.getInstance().getState() == EngineState.RUNNING) - LoggingThread.startLoggingThread(); + LoggingThread.startThread(); } case "optimizeEvents" -> optimizeEvents = parser.getBoolean(group + property); case "optimizeSubsystemInitialization" -> optimizeSubsystemInitialization = parser.getBoolean(group + property); diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/type/QueuedLogMessage.java b/base/src/main/java/de/staropensource/sosengine/base/internal/type/QueuedLogMessage.java index 735f48a7..e1beaa91 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/type/QueuedLogMessage.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/type/QueuedLogMessage.java @@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable; * @param issuerOrigin Origin of the issuer. * @param issuerMetadata Metadata about the issuer. * @param message Message of the log call. - * @see LoggingThread#startLoggingThread() + * @see LoggingThread#startThread() * @since v1-alpha1 */ @SuppressWarnings({ "unused" }) diff --git a/base/src/main/java/de/staropensource/sosengine/base/logging/LoggingThread.java b/base/src/main/java/de/staropensource/sosengine/base/logging/LoggingThread.java index 5509efe4..71f44a58 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/logging/LoggingThread.java +++ b/base/src/main/java/de/staropensource/sosengine/base/logging/LoggingThread.java @@ -103,9 +103,10 @@ public class LoggingThread { * Starts the logging thread. * * @since v1-alpha4 + * @throws IllegalStateException if thread reconstruction fails because the thread isn't {@link Thread.State#TERMINATED}, see {@link #reconstructThread()} * @see #loggingThread */ - public static void startLoggingThread() { + public static void startThread() { if (loggingThread == null) reconstructThread();