mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Switch to SLF4J logging.
This commit is contained in:
@ -21,6 +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 java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -30,15 +32,13 @@ import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Loads Sponge implementation adapters.
|
||||
*/
|
||||
public class SpongeImplLoader {
|
||||
|
||||
private static final Logger log = Logger.getLogger(SpongeImplLoader.class.getCanonicalName());
|
||||
private static final Logger log = LoggerFactory.getLogger(SpongeImplLoader.class);
|
||||
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.log(Level.INFO, "-Dworldedit.sponge.adapter used to add " + className + " to the list of available Sponge adapters");
|
||||
log.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.log(Level.WARNING, "Failed to load the Sponge adapter class '" + className +
|
||||
log.warn("Failed to load the Sponge adapter class '" + className +
|
||||
"' because it does not implement " + SpongeImplAdapter.class.getCanonicalName());
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
log.log(Level.WARNING, "Failed to load the Sponge adapter class '" + className +
|
||||
log.warn("Failed to load the Sponge adapter class '" + className +
|
||||
"' that is not supposed to be missing", e);
|
||||
} catch (IllegalAccessException e) {
|
||||
log.log(Level.WARNING, "Failed to load the Sponge adapter class '" + className +
|
||||
log.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.log(Level.WARNING, "Failed to load the Sponge adapter class '" + className + "'", e);
|
||||
log.warn("Failed to load the Sponge adapter class '" + className + "'", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user