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 0c934fa6..2bdcab05 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/EngineConfiguration.java +++ b/base/src/main/java/de/staropensource/sosengine/base/EngineConfiguration.java @@ -47,7 +47,7 @@ public final class EngineConfiguration implements SubsystemConfiguration { * -- GETTER -- * Returns the {@link EngineConfiguration} instance. * - * @return {@link EngineConfiguration} instance + * @return {@link EngineConfiguration} instance unless {@link Engine} is uninitialized * @since 1-alpha0 */ @Getter 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 1e51cc9a..0584827c 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 @@ -19,6 +19,7 @@ package de.staropensource.sosengine.base.logging; +import de.staropensource.sosengine.base.Engine; import de.staropensource.sosengine.base.EngineConfiguration; import de.staropensource.sosengine.base.classes.LoggerImpl; import de.staropensource.sosengine.base.classes.Placeholder; @@ -85,6 +86,10 @@ public final class Logger { * @since 1-alpha0 */ private static void log(@NotNull LogLevel level, @NotNull LogIssuer logIssuer, @NotNull String message) { + // Check if engine has initialized + + if (Engine.getInstance() == null) return; + // Check if level is allowed if (level.compareTo(EngineConfiguration.getInstance().getLoggerLevel()) < 0) return;