Add check if logging adapter has changed
Some checks failed
build-and-test / build (push) Failing after 4m30s
build-and-test / test (push) Failing after 5m16s
build-and-test / generate-javadoc (push) Failing after 43m0s

This commit is contained in:
JeremyStar™ 2024-12-01 16:40:06 +01:00
parent a2a19c03aa
commit 91b2ab7a22
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -21,6 +21,7 @@ package de.staropensource.engine.ansi;
import de.staropensource.engine.base.annotation.EngineSubsystem; import de.staropensource.engine.base.annotation.EngineSubsystem;
import de.staropensource.engine.base.implementable.SubsystemClass; import de.staropensource.engine.base.implementable.SubsystemClass;
import de.staropensource.engine.base.implementation.logging.PlainLoggingAdapter;
import de.staropensource.engine.base.utility.information.EngineInformation; import de.staropensource.engine.base.utility.information.EngineInformation;
import de.staropensource.engine.base.implementation.versioning.StarOpenSourceVersioningSystem; import de.staropensource.engine.base.implementation.versioning.StarOpenSourceVersioningSystem;
import de.staropensource.engine.base.logging.Logger; import de.staropensource.engine.base.logging.Logger;
@ -71,7 +72,8 @@ public final class AnsiSubsystem extends SubsystemClass {
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public void initializeSubsystem() { public void initializeSubsystem() {
Logger.setLoggingAdapter(new AnsiLoggingAdapter()); if (Logger.getLoggingAdapter().getClass().getName().equals(PlainLoggingAdapter.class.getName()))
Logger.setLoggingAdapter(new AnsiLoggingAdapter());
} }
/** {@inheritDoc} */ /** {@inheritDoc} */