From 6eca780ebf76c31500cdaef6dc7c5681eab86650 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Fri, 20 Dec 2024 17:45:10 +0100 Subject: [PATCH] Move formatter stuff out of logging package --- .../base/implementable/{logging => formatter}/Formatter.kt | 2 +- .../implementable/{logging => formatter}/OneCycleFormatter.kt | 2 +- .../implementable/{logging => formatter}/TwoCycleFormatter.kt | 2 +- .../{logging => formatter}/TwoCycleFormatterImpl.kt | 2 +- .../base/implementation/logging/NoOperationFormatter.kt | 4 +++- .../de/staropensource/engine/base/logging/CrashHandler.kt | 2 +- .../kotlin/de/staropensource/engine/base/logging/Processor.kt | 2 +- .../engine/base/type/logging/ChannelSettings.kt | 2 +- .../engine/base/utility/dnihbd/BuildInformation.kt | 2 +- 9 files changed, 11 insertions(+), 9 deletions(-) rename base/src/main/kotlin/de/staropensource/engine/base/implementable/{logging => formatter}/Formatter.kt (96%) rename base/src/main/kotlin/de/staropensource/engine/base/implementable/{logging => formatter}/OneCycleFormatter.kt (96%) rename base/src/main/kotlin/de/staropensource/engine/base/implementable/{logging => formatter}/TwoCycleFormatter.kt (97%) rename base/src/main/kotlin/de/staropensource/engine/base/implementable/{logging => formatter}/TwoCycleFormatterImpl.kt (98%) diff --git a/base/src/main/kotlin/de/staropensource/engine/base/implementable/logging/Formatter.kt b/base/src/main/kotlin/de/staropensource/engine/base/implementable/formatter/Formatter.kt similarity index 96% rename from base/src/main/kotlin/de/staropensource/engine/base/implementable/logging/Formatter.kt rename to base/src/main/kotlin/de/staropensource/engine/base/implementable/formatter/Formatter.kt index 5aa87eea2..55e4d0733 100644 --- a/base/src/main/kotlin/de/staropensource/engine/base/implementable/logging/Formatter.kt +++ b/base/src/main/kotlin/de/staropensource/engine/base/implementable/formatter/Formatter.kt @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package de.staropensource.engine.base.implementable.logging +package de.staropensource.engine.base.implementable.formatter /** * Provides log format formatting. diff --git a/base/src/main/kotlin/de/staropensource/engine/base/implementable/logging/OneCycleFormatter.kt b/base/src/main/kotlin/de/staropensource/engine/base/implementable/formatter/OneCycleFormatter.kt similarity index 96% rename from base/src/main/kotlin/de/staropensource/engine/base/implementable/logging/OneCycleFormatter.kt rename to base/src/main/kotlin/de/staropensource/engine/base/implementable/formatter/OneCycleFormatter.kt index eff42cbbc..5ebfd64ea 100644 --- a/base/src/main/kotlin/de/staropensource/engine/base/implementable/logging/OneCycleFormatter.kt +++ b/base/src/main/kotlin/de/staropensource/engine/base/implementable/formatter/OneCycleFormatter.kt @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package de.staropensource.engine.base.implementable.logging +package de.staropensource.engine.base.implementable.formatter /** * Performs message formatting in one cycle. diff --git a/base/src/main/kotlin/de/staropensource/engine/base/implementable/logging/TwoCycleFormatter.kt b/base/src/main/kotlin/de/staropensource/engine/base/implementable/formatter/TwoCycleFormatter.kt similarity index 97% rename from base/src/main/kotlin/de/staropensource/engine/base/implementable/logging/TwoCycleFormatter.kt rename to base/src/main/kotlin/de/staropensource/engine/base/implementable/formatter/TwoCycleFormatter.kt index 13b3c17ea..028befdc0 100644 --- a/base/src/main/kotlin/de/staropensource/engine/base/implementable/logging/TwoCycleFormatter.kt +++ b/base/src/main/kotlin/de/staropensource/engine/base/implementable/formatter/TwoCycleFormatter.kt @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package de.staropensource.engine.base.implementable.logging +package de.staropensource.engine.base.implementable.formatter /** * Performs message formatting in two cycles. diff --git a/base/src/main/kotlin/de/staropensource/engine/base/implementable/logging/TwoCycleFormatterImpl.kt b/base/src/main/kotlin/de/staropensource/engine/base/implementable/formatter/TwoCycleFormatterImpl.kt similarity index 98% rename from base/src/main/kotlin/de/staropensource/engine/base/implementable/logging/TwoCycleFormatterImpl.kt rename to base/src/main/kotlin/de/staropensource/engine/base/implementable/formatter/TwoCycleFormatterImpl.kt index c28eecdf2..b7213de08 100644 --- a/base/src/main/kotlin/de/staropensource/engine/base/implementable/logging/TwoCycleFormatterImpl.kt +++ b/base/src/main/kotlin/de/staropensource/engine/base/implementable/formatter/TwoCycleFormatterImpl.kt @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -package de.staropensource.engine.base.implementable.logging +package de.staropensource.engine.base.implementable.formatter import kotlin.text.iterator diff --git a/base/src/main/kotlin/de/staropensource/engine/base/implementation/logging/NoOperationFormatter.kt b/base/src/main/kotlin/de/staropensource/engine/base/implementation/logging/NoOperationFormatter.kt index d903c4e1c..a5bbc7c2b 100644 --- a/base/src/main/kotlin/de/staropensource/engine/base/implementation/logging/NoOperationFormatter.kt +++ b/base/src/main/kotlin/de/staropensource/engine/base/implementation/logging/NoOperationFormatter.kt @@ -19,13 +19,15 @@ package de.staropensource.engine.base.implementation.logging -import de.staropensource.engine.base.implementable.logging.OneCycleFormatter +import de.staropensource.engine.base.implementable.formatter.Formatter +import de.staropensource.engine.base.implementable.formatter.OneCycleFormatter import kotlin.text.iterator /** * Swallows all formatting tags * and returns a clean format. * + * @see Formatter * @since v1-alpha10 */ class NoOperationFormatter private constructor(): OneCycleFormatter() { diff --git a/base/src/main/kotlin/de/staropensource/engine/base/logging/CrashHandler.kt b/base/src/main/kotlin/de/staropensource/engine/base/logging/CrashHandler.kt index 86cd85665..7a1ef60d6 100644 --- a/base/src/main/kotlin/de/staropensource/engine/base/logging/CrashHandler.kt +++ b/base/src/main/kotlin/de/staropensource/engine/base/logging/CrashHandler.kt @@ -23,7 +23,7 @@ import de.staropensource.engine.base.Engine import de.staropensource.engine.base.EngineConfiguration import de.staropensource.engine.base.implementable.logging.Adapter import de.staropensource.engine.base.implementable.logging.CrashCategory -import de.staropensource.engine.base.implementable.logging.Formatter +import de.staropensource.engine.base.implementable.formatter.Formatter import de.staropensource.engine.base.type.logging.Call import de.staropensource.engine.base.type.logging.ChannelSettings diff --git a/base/src/main/kotlin/de/staropensource/engine/base/logging/Processor.kt b/base/src/main/kotlin/de/staropensource/engine/base/logging/Processor.kt index 39567b6e9..0b1f9be17 100644 --- a/base/src/main/kotlin/de/staropensource/engine/base/logging/Processor.kt +++ b/base/src/main/kotlin/de/staropensource/engine/base/logging/Processor.kt @@ -22,7 +22,7 @@ package de.staropensource.engine.base.logging import de.staropensource.engine.base.EngineConfiguration import de.staropensource.engine.base.implementable.logging.Adapter import de.staropensource.engine.base.implementable.logging.FormatBuilder -import de.staropensource.engine.base.implementable.logging.Formatter +import de.staropensource.engine.base.implementable.formatter.Formatter import de.staropensource.engine.base.implementable.logging.LoggerThreadingHandler import de.staropensource.engine.base.type.logging.Call import de.staropensource.engine.base.type.logging.ChannelSettings diff --git a/base/src/main/kotlin/de/staropensource/engine/base/type/logging/ChannelSettings.kt b/base/src/main/kotlin/de/staropensource/engine/base/type/logging/ChannelSettings.kt index 38545fdb9..700469413 100644 --- a/base/src/main/kotlin/de/staropensource/engine/base/type/logging/ChannelSettings.kt +++ b/base/src/main/kotlin/de/staropensource/engine/base/type/logging/ChannelSettings.kt @@ -21,7 +21,7 @@ package de.staropensource.engine.base.type.logging import de.staropensource.engine.base.EngineConfiguration import de.staropensource.engine.base.implementable.logging.Adapter -import de.staropensource.engine.base.implementable.logging.Formatter +import de.staropensource.engine.base.implementable.formatter.Formatter import de.staropensource.engine.base.implementation.logging.NoOperationFormatter import de.staropensource.engine.base.implementation.logging.adapter.PrintlnAdapter diff --git a/base/src/main/kotlin/de/staropensource/engine/base/utility/dnihbd/BuildInformation.kt b/base/src/main/kotlin/de/staropensource/engine/base/utility/dnihbd/BuildInformation.kt index e3ec044f8..af05fa949 100644 --- a/base/src/main/kotlin/de/staropensource/engine/base/utility/dnihbd/BuildInformation.kt +++ b/base/src/main/kotlin/de/staropensource/engine/base/utility/dnihbd/BuildInformation.kt @@ -356,7 +356,7 @@ open class BuildInformation return output } else - // Read from filesystem + // Read from filesystem return FileAccess("${loadLocation}/${loadPrefix}-${file}.properties") .readString() }