Update Upstream

609c7b8 Scrapped Logging Framework 4 Java

Closes #997
Closes #998
Closes #999
Closes #1000
Closes #1001
Closes #1002
This commit is contained in:
NotMyFault
2021-03-29 15:29:16 +02:00
parent 2dc89f735d
commit b96cea75b8
118 changed files with 700 additions and 743 deletions

View File

@ -36,7 +36,7 @@ import com.sk89q.worldedit.sponge.adapter.SpongeImplAdapter;
import com.sk89q.worldedit.sponge.adapter.SpongeImplLoader;
import com.sk89q.worldedit.sponge.config.SpongeConfiguration;
import org.bstats.sponge.Metrics2;
import org.slf4j.Logger;
import org.apache.logging.log4j.Logger;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.block.BlockSnapshot;
import org.spongepowered.api.block.BlockType;

View File

@ -21,8 +21,8 @@ package com.sk89q.worldedit.sponge.adapter;
import com.google.common.collect.Lists;
import com.sk89q.worldedit.util.io.Closer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.sk89q.worldedit.internal.util.LogManagerCompat;
import org.apache.logging.log4j.Logger;
import java.io.File;
import java.io.IOException;
@ -38,7 +38,7 @@ import java.util.jar.JarFile;
*/
public class SpongeImplLoader {
private static final Logger log = LoggerFactory.getLogger(SpongeImplLoader.class);
private static final Logger LOGGER = LogManagerCompat.getLogger();
private final List<String> adapterCandidates = new ArrayList<>();
private String customCandidate;
@ -71,7 +71,7 @@ public class SpongeImplLoader {
if (className != null) {
customCandidate = className;
adapterCandidates.add(className);
log.info("-Dworldedit.sponge.adapter used to add " + className + " to the list of available Sponge adapters");
LOGGER.info("-Dworldedit.sponge.adapter used to add " + className + " to the list of available Sponge adapters");
}
}
@ -157,18 +157,18 @@ public class SpongeImplLoader {
if (SpongeImplAdapter.class.isAssignableFrom(cls)) {
suitableAdapters.add((SpongeImplAdapter) cls.newInstance());
} else {
log.warn("Failed to load the Sponge adapter class '" + className +
LOGGER.warn("Failed to load the Sponge adapter class '" + className +
"' because it does not implement " + SpongeImplAdapter.class.getCanonicalName());
}
} catch (ClassNotFoundException e) {
log.warn("Failed to load the Sponge adapter class '" + className +
LOGGER.warn("Failed to load the Sponge adapter class '" + className +
"' that is not supposed to be missing", e);
} catch (IllegalAccessException e) {
log.warn("Failed to load the Sponge adapter class '" + className +
LOGGER.warn("Failed to load the Sponge adapter class '" + className +
"' that is not supposed to be raising this error", e);
} catch (Throwable e) {
if (className.equals(customCandidate)) {
log.warn("Failed to load the Sponge adapter class '" + className + "'", e);
LOGGER.warn("Failed to load the Sponge adapter class '" + className + "'", e);
}
}
}

View File

@ -30,7 +30,7 @@ import ninja.leaping.configurate.ConfigurationOptions;
import ninja.leaping.configurate.commented.CommentedConfigurationNode;
import ninja.leaping.configurate.loader.ConfigurationLoader;
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
import org.slf4j.Logger;
import org.apache.logging.log4j.Logger;
import java.io.IOException;
import java.util.HashSet;

View File

@ -23,7 +23,7 @@ import com.google.inject.Inject;
import com.sk89q.worldedit.sponge.SpongeWorldEdit;
import ninja.leaping.configurate.commented.CommentedConfigurationNode;
import ninja.leaping.configurate.loader.ConfigurationLoader;
import org.slf4j.Logger;
import org.apache.logging.log4j.Logger;
import org.spongepowered.api.config.DefaultConfig;
import java.io.File;