diff options
Diffstat (limited to 'spark-waterdog/src')
-rw-r--r-- | spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogSparkPlugin.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogSparkPlugin.java b/spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogSparkPlugin.java index 8c90ea8..fd2f031 100644 --- a/spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogSparkPlugin.java +++ b/spark-waterdog/src/main/java/me/lucko/spark/waterdog/WaterdogSparkPlugin.java @@ -31,6 +31,7 @@ import dev.waterdog.waterdogpe.command.CommandSender; import dev.waterdog.waterdogpe.plugin.Plugin; import java.nio.file.Path; +import java.util.logging.Level; import java.util.stream.Stream; public class WaterdogSparkPlugin extends Plugin implements SparkPlugin { @@ -81,6 +82,19 @@ public class WaterdogSparkPlugin extends Plugin implements SparkPlugin { } @Override + public void log(Level level, String msg) { + if (level == Level.INFO) { + getLogger().info(msg); + } else if (level == Level.WARNING) { + getLogger().warning(msg); + } else if (level == Level.SEVERE) { + getLogger().error(msg); + } else { + throw new IllegalArgumentException(level.getName()); + } + } + + @Override public ClassSourceLookup createClassSourceLookup() { return new WaterdogClassSourceLookup(getProxy()); } |