From acc7a8e33d34b05321711f29b2683dd83fda2deb Mon Sep 17 00:00:00 2001 From: shedaniel Date: Wed, 27 Jul 2022 23:30:34 +0800 Subject: Add logging module, remove build files --- .../CategoryRegistryImpl$Configuration.class | Bin 7035 -> 0 bytes .../registry/category/CategoryRegistryImpl.class | Bin 10847 -> 0 bytes .../CategoryIdentifierConstructorImpl.class | Bin 1958 -> 0 bytes .../common/category/CategoryIdentifierImpl.class | Bin 2182 -> 0 bytes .../libs/categories-transformProductionFabric.jar | Bin 166 -> 0 bytes .../libs/categories-transformProductionForge.jar | Bin 166 -> 0 bytes ...i.api.client.registry.category.CategoryRegistry | 1 - ...ei.impl.Internals.CategoryIdentifierConstructor | 1 - .../CategoryIdentifierConstructorImpl.java | 22 ------ .../libs/configs-transformProductionFabric.jar | Bin 166 -> 0 bytes .../libs/configs-transformProductionForge.jar | Bin 166 -> 0 bytes ...lt-runtime-plugin-transformProductionFabric.jar | Bin 166 -> 0 bytes ...ult-runtime-plugin-transformProductionForge.jar | Bin 166 -> 0 bytes .../libs/displays-transformProductionFabric.jar | Bin 166 -> 0 bytes .../libs/displays-transformProductionForge.jar | Bin 166 -> 0 bytes .../libs/entries-transformProductionFabric.jar | Bin 166 -> 0 bytes .../libs/entries-transformProductionForge.jar | Bin 166 -> 0 bytes ...y-stacks-8.3.9999-transformProductionFabric.jar | Bin 166 -> 0 bytes ...ry-stacks-8.3.9999-transformProductionForge.jar | Bin 166 -> 0 bytes .../entry-stacks-transformProductionFabric.jar | Bin 166 -> 0 bytes .../libs/entry-stacks-transformProductionForge.jar | Bin 166 -> 0 bytes ...ry-types-8.3.9999-transformProductionFabric.jar | Bin 166 -> 0 bytes ...try-types-8.3.9999-transformProductionForge.jar | Bin 166 -> 0 bytes .../libs/entry-types-transformProductionFabric.jar | Bin 166 -> 0 bytes .../libs/entry-types-transformProductionForge.jar | Bin 166 -> 0 bytes .../libs/favorites-transformProductionFabric.jar | Bin 166 -> 0 bytes .../libs/favorites-transformProductionForge.jar | Bin 166 -> 0 bytes ...filtering-entries-transformProductionFabric.jar | Bin 166 -> 0 bytes .../filtering-entries-transformProductionForge.jar | Bin 166 -> 0 bytes .../rei/impl/common/logging/FileLogger.java | 80 +++++++++++++++++++++ .../rei/impl/common/logging/FilteringLogger.java | 58 +++++++++++++++ .../rei/impl/common/logging/Log4JLogger.java | 52 ++++++++++++++ .../rei/impl/common/logging/LoggerInitializer.java | 43 +++++++++++ .../rei/impl/common/logging/MultiLogger.java | 58 +++++++++++++++ .../impl/common/logging/TransformingLogger.java | 56 +++++++++++++++ .../registry/screen/ExclusionZonesImpl.class | Bin 9115 -> 0 bytes .../registry/screen/ScreenRegistryImpl$1.class | Bin 2749 -> 0 bytes .../registry/screen/ScreenRegistryImpl$2.class | Bin 2322 -> 0 bytes .../registry/screen/ScreenRegistryImpl$3.class | Bin 2325 -> 0 bytes .../registry/screen/ScreenRegistryImpl.class | Bin 20609 -> 0 bytes .../libs/screens-transformProductionFabric.jar | Bin 166 -> 0 bytes .../libs/screens-transformProductionForge.jar | Bin 166 -> 0 bytes .../tmp/compileJava/previous-compilation-data.bin | Bin 112600 -> 0 bytes .../libs/search-transformProductionFabric.jar | Bin 166 -> 0 bytes .../build/libs/search-transformProductionForge.jar | Bin 166 -> 0 bytes .../rei/impl/common/logging/FileLogger.java | 80 --------------------- .../rei/impl/common/logging/FilteringLogger.java | 58 --------------- .../rei/impl/common/logging/Log4JLogger.java | 52 -------------- .../rei/impl/common/logging/MultiLogger.java | 58 --------------- .../impl/common/logging/TransformingLogger.java | 56 --------------- .../rei/impl/init/RoughlyEnoughItemsEngine.java | 46 ------------ .../libs/subsets-transformProductionFabric.jar | Bin 166 -> 0 bytes .../libs/subsets-transformProductionForge.jar | Bin 166 -> 0 bytes ...transfer-handlers-transformProductionFabric.jar | Bin 166 -> 0 bytes .../transfer-handlers-transformProductionForge.jar | Bin 166 -> 0 bytes 55 files changed, 347 insertions(+), 374 deletions(-) delete mode 100644 runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/client/registry/category/CategoryRegistryImpl$Configuration.class delete mode 100644 runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/client/registry/category/CategoryRegistryImpl.class delete mode 100644 runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/common/category/CategoryIdentifierConstructorImpl.class delete mode 100644 runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/common/category/CategoryIdentifierImpl.class delete mode 100644 runtime-engine/categories/build/libs/categories-transformProductionFabric.jar delete mode 100644 runtime-engine/categories/build/libs/categories-transformProductionForge.jar delete mode 100644 runtime-engine/categories/build/resources/main/META-INF/services/me.shedaniel.rei.api.client.registry.category.CategoryRegistry delete mode 100644 runtime-engine/categories/build/resources/main/META-INF/services/me.shedaniel.rei.impl.Internals.CategoryIdentifierConstructor delete mode 100644 runtime-engine/categories/build/tmp/updateLicenseMain/original/me/shedaniel/rei/impl/common/category/CategoryIdentifierConstructorImpl.java delete mode 100644 runtime-engine/configs/build/libs/configs-transformProductionFabric.jar delete mode 100644 runtime-engine/configs/build/libs/configs-transformProductionForge.jar delete mode 100644 runtime-engine/default-runtime-plugin/build/libs/default-runtime-plugin-transformProductionFabric.jar delete mode 100644 runtime-engine/default-runtime-plugin/build/libs/default-runtime-plugin-transformProductionForge.jar delete mode 100644 runtime-engine/displays/build/libs/displays-transformProductionFabric.jar delete mode 100644 runtime-engine/displays/build/libs/displays-transformProductionForge.jar delete mode 100644 runtime-engine/entries/build/libs/entries-transformProductionFabric.jar delete mode 100644 runtime-engine/entries/build/libs/entries-transformProductionForge.jar delete mode 100644 runtime-engine/entry-stacks/build/libs/RoughlyEnoughItems-entry-stacks-8.3.9999-transformProductionFabric.jar delete mode 100644 runtime-engine/entry-stacks/build/libs/RoughlyEnoughItems-entry-stacks-8.3.9999-transformProductionForge.jar delete mode 100644 runtime-engine/entry-stacks/build/libs/entry-stacks-transformProductionFabric.jar delete mode 100644 runtime-engine/entry-stacks/build/libs/entry-stacks-transformProductionForge.jar delete mode 100644 runtime-engine/entry-types/build/libs/RoughlyEnoughItems-entry-types-8.3.9999-transformProductionFabric.jar delete mode 100644 runtime-engine/entry-types/build/libs/RoughlyEnoughItems-entry-types-8.3.9999-transformProductionForge.jar delete mode 100644 runtime-engine/entry-types/build/libs/entry-types-transformProductionFabric.jar delete mode 100644 runtime-engine/entry-types/build/libs/entry-types-transformProductionForge.jar delete mode 100644 runtime-engine/favorites/build/libs/favorites-transformProductionFabric.jar delete mode 100644 runtime-engine/favorites/build/libs/favorites-transformProductionForge.jar delete mode 100644 runtime-engine/filtering-entries/build/libs/filtering-entries-transformProductionFabric.jar delete mode 100644 runtime-engine/filtering-entries/build/libs/filtering-entries-transformProductionForge.jar create mode 100644 runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/FileLogger.java create mode 100644 runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/FilteringLogger.java create mode 100644 runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/Log4JLogger.java create mode 100644 runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/LoggerInitializer.java create mode 100644 runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/MultiLogger.java create mode 100644 runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/TransformingLogger.java delete mode 100644 runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ExclusionZonesImpl.class delete mode 100644 runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl$1.class delete mode 100644 runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl$2.class delete mode 100644 runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl$3.class delete mode 100644 runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl.class delete mode 100644 runtime-engine/screens/build/libs/screens-transformProductionFabric.jar delete mode 100644 runtime-engine/screens/build/libs/screens-transformProductionForge.jar delete mode 100644 runtime-engine/screens/build/tmp/compileJava/previous-compilation-data.bin delete mode 100644 runtime-engine/search/build/libs/search-transformProductionFabric.jar delete mode 100644 runtime-engine/search/build/libs/search-transformProductionForge.jar delete mode 100644 runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/FileLogger.java delete mode 100644 runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/FilteringLogger.java delete mode 100644 runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/Log4JLogger.java delete mode 100644 runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/MultiLogger.java delete mode 100644 runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/TransformingLogger.java delete mode 100644 runtime-engine/src/main/java/me/shedaniel/rei/impl/init/RoughlyEnoughItemsEngine.java delete mode 100644 runtime-engine/subsets/build/libs/subsets-transformProductionFabric.jar delete mode 100644 runtime-engine/subsets/build/libs/subsets-transformProductionForge.jar delete mode 100644 runtime-engine/transfer-handlers/build/libs/transfer-handlers-transformProductionFabric.jar delete mode 100644 runtime-engine/transfer-handlers/build/libs/transfer-handlers-transformProductionForge.jar (limited to 'runtime-engine') diff --git a/runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/client/registry/category/CategoryRegistryImpl$Configuration.class b/runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/client/registry/category/CategoryRegistryImpl$Configuration.class deleted file mode 100644 index 06ebb4a0d..000000000 Binary files a/runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/client/registry/category/CategoryRegistryImpl$Configuration.class and /dev/null differ diff --git a/runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/client/registry/category/CategoryRegistryImpl.class b/runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/client/registry/category/CategoryRegistryImpl.class deleted file mode 100644 index 2107b717e..000000000 Binary files a/runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/client/registry/category/CategoryRegistryImpl.class and /dev/null differ diff --git a/runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/common/category/CategoryIdentifierConstructorImpl.class b/runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/common/category/CategoryIdentifierConstructorImpl.class deleted file mode 100644 index f068ae2eb..000000000 Binary files a/runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/common/category/CategoryIdentifierConstructorImpl.class and /dev/null differ diff --git a/runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/common/category/CategoryIdentifierImpl.class b/runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/common/category/CategoryIdentifierImpl.class deleted file mode 100644 index 360d87b86..000000000 Binary files a/runtime-engine/categories/build/classes/java/main/me/shedaniel/rei/impl/common/category/CategoryIdentifierImpl.class and /dev/null differ diff --git a/runtime-engine/categories/build/libs/categories-transformProductionFabric.jar b/runtime-engine/categories/build/libs/categories-transformProductionFabric.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/categories/build/libs/categories-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/categories/build/libs/categories-transformProductionForge.jar b/runtime-engine/categories/build/libs/categories-transformProductionForge.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/categories/build/libs/categories-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/categories/build/resources/main/META-INF/services/me.shedaniel.rei.api.client.registry.category.CategoryRegistry b/runtime-engine/categories/build/resources/main/META-INF/services/me.shedaniel.rei.api.client.registry.category.CategoryRegistry deleted file mode 100644 index 61b3a5741..000000000 --- a/runtime-engine/categories/build/resources/main/META-INF/services/me.shedaniel.rei.api.client.registry.category.CategoryRegistry +++ /dev/null @@ -1 +0,0 @@ -me.shedaniel.rei.impl.client.registry.category.CategoryRegistryImpl \ No newline at end of file diff --git a/runtime-engine/categories/build/resources/main/META-INF/services/me.shedaniel.rei.impl.Internals.CategoryIdentifierConstructor b/runtime-engine/categories/build/resources/main/META-INF/services/me.shedaniel.rei.impl.Internals.CategoryIdentifierConstructor deleted file mode 100644 index 6909538ca..000000000 --- a/runtime-engine/categories/build/resources/main/META-INF/services/me.shedaniel.rei.impl.Internals.CategoryIdentifierConstructor +++ /dev/null @@ -1 +0,0 @@ -me.shedaniel.rei.impl.common.category.CategoryIdentifierConstructorImpl \ No newline at end of file diff --git a/runtime-engine/categories/build/tmp/updateLicenseMain/original/me/shedaniel/rei/impl/common/category/CategoryIdentifierConstructorImpl.java b/runtime-engine/categories/build/tmp/updateLicenseMain/original/me/shedaniel/rei/impl/common/category/CategoryIdentifierConstructorImpl.java deleted file mode 100644 index cef00c684..000000000 --- a/runtime-engine/categories/build/tmp/updateLicenseMain/original/me/shedaniel/rei/impl/common/category/CategoryIdentifierConstructorImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package me.shedaniel.rei.impl.common.category; - -import me.shedaniel.rei.api.common.category.CategoryIdentifier; -import me.shedaniel.rei.api.common.display.Display; -import me.shedaniel.rei.impl.Internals; -import net.minecraft.resources.ResourceLocation; - -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -public class CategoryIdentifierConstructorImpl implements Internals.CategoryIdentifierConstructor { - private static final Map> CACHE = new ConcurrentHashMap<>(); - - @Override - public CategoryIdentifier create(String location) { - CategoryIdentifier identifier = CACHE.get(location); - if (identifier != null) return identifier.cast(); - identifier = new CategoryIdentifierImpl<>(new ResourceLocation(location)); - CACHE.put(location, identifier); - return identifier.cast(); - } -} diff --git a/runtime-engine/configs/build/libs/configs-transformProductionFabric.jar b/runtime-engine/configs/build/libs/configs-transformProductionFabric.jar deleted file mode 100644 index eabc1eb02..000000000 Binary files a/runtime-engine/configs/build/libs/configs-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/configs/build/libs/configs-transformProductionForge.jar b/runtime-engine/configs/build/libs/configs-transformProductionForge.jar deleted file mode 100644 index eabc1eb02..000000000 Binary files a/runtime-engine/configs/build/libs/configs-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/default-runtime-plugin/build/libs/default-runtime-plugin-transformProductionFabric.jar b/runtime-engine/default-runtime-plugin/build/libs/default-runtime-plugin-transformProductionFabric.jar deleted file mode 100644 index 6430324c7..000000000 Binary files a/runtime-engine/default-runtime-plugin/build/libs/default-runtime-plugin-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/default-runtime-plugin/build/libs/default-runtime-plugin-transformProductionForge.jar b/runtime-engine/default-runtime-plugin/build/libs/default-runtime-plugin-transformProductionForge.jar deleted file mode 100644 index 6430324c7..000000000 Binary files a/runtime-engine/default-runtime-plugin/build/libs/default-runtime-plugin-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/displays/build/libs/displays-transformProductionFabric.jar b/runtime-engine/displays/build/libs/displays-transformProductionFabric.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/displays/build/libs/displays-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/displays/build/libs/displays-transformProductionForge.jar b/runtime-engine/displays/build/libs/displays-transformProductionForge.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/displays/build/libs/displays-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/entries/build/libs/entries-transformProductionFabric.jar b/runtime-engine/entries/build/libs/entries-transformProductionFabric.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/entries/build/libs/entries-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/entries/build/libs/entries-transformProductionForge.jar b/runtime-engine/entries/build/libs/entries-transformProductionForge.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/entries/build/libs/entries-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/entry-stacks/build/libs/RoughlyEnoughItems-entry-stacks-8.3.9999-transformProductionFabric.jar b/runtime-engine/entry-stacks/build/libs/RoughlyEnoughItems-entry-stacks-8.3.9999-transformProductionFabric.jar deleted file mode 100644 index 7c15ed0d5..000000000 Binary files a/runtime-engine/entry-stacks/build/libs/RoughlyEnoughItems-entry-stacks-8.3.9999-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/entry-stacks/build/libs/RoughlyEnoughItems-entry-stacks-8.3.9999-transformProductionForge.jar b/runtime-engine/entry-stacks/build/libs/RoughlyEnoughItems-entry-stacks-8.3.9999-transformProductionForge.jar deleted file mode 100644 index 7c15ed0d5..000000000 Binary files a/runtime-engine/entry-stacks/build/libs/RoughlyEnoughItems-entry-stacks-8.3.9999-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/entry-stacks/build/libs/entry-stacks-transformProductionFabric.jar b/runtime-engine/entry-stacks/build/libs/entry-stacks-transformProductionFabric.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/entry-stacks/build/libs/entry-stacks-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/entry-stacks/build/libs/entry-stacks-transformProductionForge.jar b/runtime-engine/entry-stacks/build/libs/entry-stacks-transformProductionForge.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/entry-stacks/build/libs/entry-stacks-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/entry-types/build/libs/RoughlyEnoughItems-entry-types-8.3.9999-transformProductionFabric.jar b/runtime-engine/entry-types/build/libs/RoughlyEnoughItems-entry-types-8.3.9999-transformProductionFabric.jar deleted file mode 100644 index 46ac07fb2..000000000 Binary files a/runtime-engine/entry-types/build/libs/RoughlyEnoughItems-entry-types-8.3.9999-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/entry-types/build/libs/RoughlyEnoughItems-entry-types-8.3.9999-transformProductionForge.jar b/runtime-engine/entry-types/build/libs/RoughlyEnoughItems-entry-types-8.3.9999-transformProductionForge.jar deleted file mode 100644 index 46ac07fb2..000000000 Binary files a/runtime-engine/entry-types/build/libs/RoughlyEnoughItems-entry-types-8.3.9999-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/entry-types/build/libs/entry-types-transformProductionFabric.jar b/runtime-engine/entry-types/build/libs/entry-types-transformProductionFabric.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/entry-types/build/libs/entry-types-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/entry-types/build/libs/entry-types-transformProductionForge.jar b/runtime-engine/entry-types/build/libs/entry-types-transformProductionForge.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/entry-types/build/libs/entry-types-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/favorites/build/libs/favorites-transformProductionFabric.jar b/runtime-engine/favorites/build/libs/favorites-transformProductionFabric.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/favorites/build/libs/favorites-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/favorites/build/libs/favorites-transformProductionForge.jar b/runtime-engine/favorites/build/libs/favorites-transformProductionForge.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/favorites/build/libs/favorites-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/filtering-entries/build/libs/filtering-entries-transformProductionFabric.jar b/runtime-engine/filtering-entries/build/libs/filtering-entries-transformProductionFabric.jar deleted file mode 100644 index b713a813d..000000000 Binary files a/runtime-engine/filtering-entries/build/libs/filtering-entries-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/filtering-entries/build/libs/filtering-entries-transformProductionForge.jar b/runtime-engine/filtering-entries/build/libs/filtering-entries-transformProductionForge.jar deleted file mode 100644 index b713a813d..000000000 Binary files a/runtime-engine/filtering-entries/build/libs/filtering-entries-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/FileLogger.java b/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/FileLogger.java new file mode 100644 index 000000000..3e7d88eec --- /dev/null +++ b/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/FileLogger.java @@ -0,0 +1,80 @@ +/* + * This file is licensed under the MIT License, part of Roughly Enough Items. + * Copyright (c) 2018, 2019, 2020, 2021, 2022 shedaniel + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.shedaniel.rei.impl.common.logging; + +import me.shedaniel.rei.impl.common.InternalLogger; +import org.apache.commons.io.output.NullOutputStream; +import org.apache.logging.log4j.Level; +import org.jetbrains.annotations.ApiStatus; + +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + +@ApiStatus.Internal +public class FileLogger implements InternalLogger { + private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("HH:mm:ss"); + private final Writer writer; + + public FileLogger(Path file) { + Writer w; + try { + if (file.getParent() != null) Files.createDirectories(file.getParent()); + file.toFile().createNewFile(); + w = new OutputStreamWriter(new FileOutputStream(file.toFile()), StandardCharsets.UTF_8); + } catch (IOException exception) { + exception.printStackTrace(); + w = new OutputStreamWriter(new NullOutputStream()); + } + + this.writer = w; + } + + @Override + public void throwException(Throwable throwable) { + throwable.printStackTrace(new PrintWriter(writer, true)); + } + + @Override + public void log(Level level, String message) { + message = String.format("[%s] [%s/%s] %s", DATE_TIME_FORMATTER.format(LocalDateTime.now()), Thread.currentThread().getName(), level, message); + + try { + writer.write(message); + writer.write("\n"); + writer.flush(); + } catch (IOException exception) { + exception.printStackTrace(); + } + } + + @Override + public void log(Level level, String message, Throwable throwable) { + log(level, message); + throwable.printStackTrace(new PrintWriter(writer, true)); + } +} diff --git a/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/FilteringLogger.java b/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/FilteringLogger.java new file mode 100644 index 000000000..2e40beee8 --- /dev/null +++ b/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/FilteringLogger.java @@ -0,0 +1,58 @@ +/* + * This file is licensed under the MIT License, part of Roughly Enough Items. + * Copyright (c) 2018, 2019, 2020, 2021, 2022 shedaniel + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.shedaniel.rei.impl.common.logging; + +import me.shedaniel.rei.impl.common.InternalLogger; +import org.apache.logging.log4j.Level; +import org.jetbrains.annotations.ApiStatus; + +@ApiStatus.Internal +public class FilteringLogger implements InternalLogger { + private final InternalLogger logger; + private final Level minLevel; + + public FilteringLogger(InternalLogger logger, Level minLevel) { + this.logger = logger; + this.minLevel = minLevel; + } + + @Override + public void throwException(Throwable throwable) { + logger.throwException(throwable); + } + + @Override + public void log(Level level, String message) { + if (level.isLessSpecificThan(minLevel)) + return; + logger.log(level, message); + } + + @Override + public void log(Level level, String message, Throwable throwable) { + if (level.isLessSpecificThan(minLevel)) + return; + logger.log(level, message, throwable); + } +} diff --git a/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/Log4JLogger.java b/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/Log4JLogger.java new file mode 100644 index 000000000..3dfd8d395 --- /dev/null +++ b/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/Log4JLogger.java @@ -0,0 +1,52 @@ +/* + * This file is licensed under the MIT License, part of Roughly Enough Items. + * Copyright (c) 2018, 2019, 2020, 2021, 2022 shedaniel + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.shedaniel.rei.impl.common.logging; + +import me.shedaniel.rei.impl.common.InternalLogger; +import org.apache.logging.log4j.Level; +import org.jetbrains.annotations.ApiStatus; + +@ApiStatus.Internal +public class Log4JLogger implements InternalLogger { + private final org.apache.logging.log4j.Logger logger; + + public Log4JLogger(org.apache.logging.log4j.Logger logger) { + this.logger = logger; + } + + @Override + public void throwException(Throwable throwable) { + logger.throwing(throwable); + } + + @Override + public void log(Level level, String message) { + logger.log(level, message); + } + + @Override + public void log(Level level, String message, Throwable throwable) { + logger.log(level, message, throwable); + } +} diff --git a/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/LoggerInitializer.java b/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/LoggerInitializer.java new file mode 100644 index 000000000..88ad97977 --- /dev/null +++ b/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/LoggerInitializer.java @@ -0,0 +1,43 @@ +/* + * This file is licensed under the MIT License, part of Roughly Enough Items. + * Copyright (c) 2018, 2019, 2020, 2021, 2022 shedaniel + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.shedaniel.rei.impl.common.logging; + +import com.google.common.collect.ImmutableList; +import dev.architectury.platform.Platform; +import me.shedaniel.rei.impl.Internals; +import me.shedaniel.rei.impl.common.InternalLogger; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; + +public class LoggerInitializer { + private static final InternalLogger LOGGER = new TransformingLogger(new MultiLogger(ImmutableList.of( + new FileLogger(Platform.getGameFolder().resolve("logs/rei.log")), + new FilteringLogger(new FileLogger(Platform.getGameFolder().resolve("logs/rei-issues.log")), Level.WARN), + new Log4JLogger(LogManager.getFormatterLogger("REI")) + )), message -> "[REI] " + message); + + public static void onInitialize() { + Internals.attachInstanceSupplier(LOGGER, "logger"); + } +} diff --git a/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/MultiLogger.java b/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/MultiLogger.java new file mode 100644 index 000000000..92a11e3bc --- /dev/null +++ b/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/MultiLogger.java @@ -0,0 +1,58 @@ +/* + * This file is licensed under the MIT License, part of Roughly Enough Items. + * Copyright (c) 2018, 2019, 2020, 2021, 2022 shedaniel + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.shedaniel.rei.impl.common.logging; + +import me.shedaniel.rei.impl.common.InternalLogger; +import org.apache.logging.log4j.Level; +import org.jetbrains.annotations.ApiStatus; + +@ApiStatus.Internal +public class MultiLogger implements InternalLogger { + private final Iterable loggers; + + public MultiLogger(Iterable loggers) { + this.loggers = loggers; + } + + @Override + public void throwException(Throwable throwable) { + for (InternalLogger logger : loggers) { + logger.throwException(throwable); + } + } + + @Override + public void log(Level level, String message) { + for (InternalLogger logger : loggers) { + logger.log(level, message); + } + } + + @Override + public void log(Level level, String message, Throwable throwable) { + for (InternalLogger logger : loggers) { + logger.log(level, message, throwable); + } + } +} diff --git a/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/TransformingLogger.java b/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/TransformingLogger.java new file mode 100644 index 000000000..0540d8baa --- /dev/null +++ b/runtime-engine/logging/src/main/java/me/shedaniel/rei/impl/common/logging/TransformingLogger.java @@ -0,0 +1,56 @@ +/* + * This file is licensed under the MIT License, part of Roughly Enough Items. + * Copyright (c) 2018, 2019, 2020, 2021, 2022 shedaniel + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.shedaniel.rei.impl.common.logging; + +import me.shedaniel.rei.impl.common.InternalLogger; +import org.apache.logging.log4j.Level; +import org.jetbrains.annotations.ApiStatus; + +import java.util.function.UnaryOperator; + +@ApiStatus.Internal +public class TransformingLogger implements InternalLogger { + private final InternalLogger logger; + private final UnaryOperator transformer; + + public TransformingLogger(InternalLogger logger, UnaryOperator transformer) { + this.logger = logger; + this.transformer = transformer; + } + + @Override + public void throwException(Throwable throwable) { + logger.throwException(throwable); + } + + @Override + public void log(Level level, String message) { + logger.log(level, transformer.apply(message)); + } + + @Override + public void log(Level level, String message, Throwable throwable) { + logger.log(level, transformer.apply(message), throwable); + } +} diff --git a/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ExclusionZonesImpl.class b/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ExclusionZonesImpl.class deleted file mode 100644 index 1a1d88b5d..000000000 Binary files a/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ExclusionZonesImpl.class and /dev/null differ diff --git a/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl$1.class b/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl$1.class deleted file mode 100644 index ce3a2e14d..000000000 Binary files a/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl$1.class and /dev/null differ diff --git a/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl$2.class b/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl$2.class deleted file mode 100644 index adfa8d7ef..000000000 Binary files a/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl$2.class and /dev/null differ diff --git a/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl$3.class b/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl$3.class deleted file mode 100644 index e7b0fdac7..000000000 Binary files a/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl$3.class and /dev/null differ diff --git a/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl.class b/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl.class deleted file mode 100644 index 071c40c21..000000000 Binary files a/runtime-engine/screens/build/classes/java/main/me/shedaniel/rei/impl/client/registry/screen/ScreenRegistryImpl.class and /dev/null differ diff --git a/runtime-engine/screens/build/libs/screens-transformProductionFabric.jar b/runtime-engine/screens/build/libs/screens-transformProductionFabric.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/screens/build/libs/screens-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/screens/build/libs/screens-transformProductionForge.jar b/runtime-engine/screens/build/libs/screens-transformProductionForge.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/screens/build/libs/screens-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/screens/build/tmp/compileJava/previous-compilation-data.bin b/runtime-engine/screens/build/tmp/compileJava/previous-compilation-data.bin deleted file mode 100644 index e87e01988..000000000 Binary files a/runtime-engine/screens/build/tmp/compileJava/previous-compilation-data.bin and /dev/null differ diff --git a/runtime-engine/search/build/libs/search-transformProductionFabric.jar b/runtime-engine/search/build/libs/search-transformProductionFabric.jar deleted file mode 100644 index 298b693b1..000000000 Binary files a/runtime-engine/search/build/libs/search-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/search/build/libs/search-transformProductionForge.jar b/runtime-engine/search/build/libs/search-transformProductionForge.jar deleted file mode 100644 index 298b693b1..000000000 Binary files a/runtime-engine/search/build/libs/search-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/FileLogger.java b/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/FileLogger.java deleted file mode 100644 index 3e7d88eec..000000000 --- a/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/FileLogger.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * This file is licensed under the MIT License, part of Roughly Enough Items. - * Copyright (c) 2018, 2019, 2020, 2021, 2022 shedaniel - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package me.shedaniel.rei.impl.common.logging; - -import me.shedaniel.rei.impl.common.InternalLogger; -import org.apache.commons.io.output.NullOutputStream; -import org.apache.logging.log4j.Level; -import org.jetbrains.annotations.ApiStatus; - -import java.io.*; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; - -@ApiStatus.Internal -public class FileLogger implements InternalLogger { - private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("HH:mm:ss"); - private final Writer writer; - - public FileLogger(Path file) { - Writer w; - try { - if (file.getParent() != null) Files.createDirectories(file.getParent()); - file.toFile().createNewFile(); - w = new OutputStreamWriter(new FileOutputStream(file.toFile()), StandardCharsets.UTF_8); - } catch (IOException exception) { - exception.printStackTrace(); - w = new OutputStreamWriter(new NullOutputStream()); - } - - this.writer = w; - } - - @Override - public void throwException(Throwable throwable) { - throwable.printStackTrace(new PrintWriter(writer, true)); - } - - @Override - public void log(Level level, String message) { - message = String.format("[%s] [%s/%s] %s", DATE_TIME_FORMATTER.format(LocalDateTime.now()), Thread.currentThread().getName(), level, message); - - try { - writer.write(message); - writer.write("\n"); - writer.flush(); - } catch (IOException exception) { - exception.printStackTrace(); - } - } - - @Override - public void log(Level level, String message, Throwable throwable) { - log(level, message); - throwable.printStackTrace(new PrintWriter(writer, true)); - } -} diff --git a/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/FilteringLogger.java b/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/FilteringLogger.java deleted file mode 100644 index 2e40beee8..000000000 --- a/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/FilteringLogger.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is licensed under the MIT License, part of Roughly Enough Items. - * Copyright (c) 2018, 2019, 2020, 2021, 2022 shedaniel - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package me.shedaniel.rei.impl.common.logging; - -import me.shedaniel.rei.impl.common.InternalLogger; -import org.apache.logging.log4j.Level; -import org.jetbrains.annotations.ApiStatus; - -@ApiStatus.Internal -public class FilteringLogger implements InternalLogger { - private final InternalLogger logger; - private final Level minLevel; - - public FilteringLogger(InternalLogger logger, Level minLevel) { - this.logger = logger; - this.minLevel = minLevel; - } - - @Override - public void throwException(Throwable throwable) { - logger.throwException(throwable); - } - - @Override - public void log(Level level, String message) { - if (level.isLessSpecificThan(minLevel)) - return; - logger.log(level, message); - } - - @Override - public void log(Level level, String message, Throwable throwable) { - if (level.isLessSpecificThan(minLevel)) - return; - logger.log(level, message, throwable); - } -} diff --git a/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/Log4JLogger.java b/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/Log4JLogger.java deleted file mode 100644 index 3dfd8d395..000000000 --- a/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/Log4JLogger.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This file is licensed under the MIT License, part of Roughly Enough Items. - * Copyright (c) 2018, 2019, 2020, 2021, 2022 shedaniel - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package me.shedaniel.rei.impl.common.logging; - -import me.shedaniel.rei.impl.common.InternalLogger; -import org.apache.logging.log4j.Level; -import org.jetbrains.annotations.ApiStatus; - -@ApiStatus.Internal -public class Log4JLogger implements InternalLogger { - private final org.apache.logging.log4j.Logger logger; - - public Log4JLogger(org.apache.logging.log4j.Logger logger) { - this.logger = logger; - } - - @Override - public void throwException(Throwable throwable) { - logger.throwing(throwable); - } - - @Override - public void log(Level level, String message) { - logger.log(level, message); - } - - @Override - public void log(Level level, String message, Throwable throwable) { - logger.log(level, message, throwable); - } -} diff --git a/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/MultiLogger.java b/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/MultiLogger.java deleted file mode 100644 index 92a11e3bc..000000000 --- a/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/MultiLogger.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is licensed under the MIT License, part of Roughly Enough Items. - * Copyright (c) 2018, 2019, 2020, 2021, 2022 shedaniel - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package me.shedaniel.rei.impl.common.logging; - -import me.shedaniel.rei.impl.common.InternalLogger; -import org.apache.logging.log4j.Level; -import org.jetbrains.annotations.ApiStatus; - -@ApiStatus.Internal -public class MultiLogger implements InternalLogger { - private final Iterable loggers; - - public MultiLogger(Iterable loggers) { - this.loggers = loggers; - } - - @Override - public void throwException(Throwable throwable) { - for (InternalLogger logger : loggers) { - logger.throwException(throwable); - } - } - - @Override - public void log(Level level, String message) { - for (InternalLogger logger : loggers) { - logger.log(level, message); - } - } - - @Override - public void log(Level level, String message, Throwable throwable) { - for (InternalLogger logger : loggers) { - logger.log(level, message, throwable); - } - } -} diff --git a/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/TransformingLogger.java b/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/TransformingLogger.java deleted file mode 100644 index 0540d8baa..000000000 --- a/runtime-engine/src/main/java/me/shedaniel/rei/impl/common/logging/TransformingLogger.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This file is licensed under the MIT License, part of Roughly Enough Items. - * Copyright (c) 2018, 2019, 2020, 2021, 2022 shedaniel - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package me.shedaniel.rei.impl.common.logging; - -import me.shedaniel.rei.impl.common.InternalLogger; -import org.apache.logging.log4j.Level; -import org.jetbrains.annotations.ApiStatus; - -import java.util.function.UnaryOperator; - -@ApiStatus.Internal -public class TransformingLogger implements InternalLogger { - private final InternalLogger logger; - private final UnaryOperator transformer; - - public TransformingLogger(InternalLogger logger, UnaryOperator transformer) { - this.logger = logger; - this.transformer = transformer; - } - - @Override - public void throwException(Throwable throwable) { - logger.throwException(throwable); - } - - @Override - public void log(Level level, String message) { - logger.log(level, transformer.apply(message)); - } - - @Override - public void log(Level level, String message, Throwable throwable) { - logger.log(level, transformer.apply(message), throwable); - } -} diff --git a/runtime-engine/src/main/java/me/shedaniel/rei/impl/init/RoughlyEnoughItemsEngine.java b/runtime-engine/src/main/java/me/shedaniel/rei/impl/init/RoughlyEnoughItemsEngine.java deleted file mode 100644 index e66d0b05b..000000000 --- a/runtime-engine/src/main/java/me/shedaniel/rei/impl/init/RoughlyEnoughItemsEngine.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This file is licensed under the MIT License, part of Roughly Enough Items. - * Copyright (c) 2018, 2019, 2020, 2021, 2022 shedaniel - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package me.shedaniel.rei.impl.init; - -import com.google.common.collect.ImmutableList; -import dev.architectury.platform.Platform; -import me.shedaniel.rei.impl.Internals; -import me.shedaniel.rei.impl.common.InternalLogger; -import me.shedaniel.rei.impl.common.logging.*; -import org.apache.logging.log4j.Level; -import org.apache.logging.log4j.LogManager; -import org.jetbrains.annotations.ApiStatus; - -@ApiStatus.Internal -public class RoughlyEnoughItemsEngine { - private static final InternalLogger LOGGER = new TransformingLogger(new MultiLogger(ImmutableList.of( - new FileLogger(Platform.getGameFolder().resolve("logs/rei.log")), - new FilteringLogger(new FileLogger(Platform.getGameFolder().resolve("logs/rei-issues.log")), Level.WARN), - new Log4JLogger(LogManager.getFormatterLogger("REI")) - )), message -> "[REI] " + message); - - public static void onInitialize() { - Internals.attachInstanceSupplier(LOGGER, "logger"); - } -} diff --git a/runtime-engine/subsets/build/libs/subsets-transformProductionFabric.jar b/runtime-engine/subsets/build/libs/subsets-transformProductionFabric.jar deleted file mode 100644 index 8d5af12ea..000000000 Binary files a/runtime-engine/subsets/build/libs/subsets-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/subsets/build/libs/subsets-transformProductionForge.jar b/runtime-engine/subsets/build/libs/subsets-transformProductionForge.jar deleted file mode 100644 index 8d5af12ea..000000000 Binary files a/runtime-engine/subsets/build/libs/subsets-transformProductionForge.jar and /dev/null differ diff --git a/runtime-engine/transfer-handlers/build/libs/transfer-handlers-transformProductionFabric.jar b/runtime-engine/transfer-handlers/build/libs/transfer-handlers-transformProductionFabric.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/transfer-handlers/build/libs/transfer-handlers-transformProductionFabric.jar and /dev/null differ diff --git a/runtime-engine/transfer-handlers/build/libs/transfer-handlers-transformProductionForge.jar b/runtime-engine/transfer-handlers/build/libs/transfer-handlers-transformProductionForge.jar deleted file mode 100644 index 08580be66..000000000 Binary files a/runtime-engine/transfer-handlers/build/libs/transfer-handlers-transformProductionForge.jar and /dev/null differ -- cgit