diff options
author | Luck <git@lucko.me> | 2021-11-01 20:45:46 +0000 |
---|---|---|
committer | Luck <git@lucko.me> | 2021-11-01 20:46:16 +0000 |
commit | fe578229bf7e77b522eda8737374c2f26b30c24b (patch) | |
tree | 467b78fbbccb801788194f6a6e586963458f41d8 /spark-nukkit/src/main | |
parent | 8ebf2d39a1d95c409d2151374b8ff1ad9e776d97 (diff) | |
download | spark-fe578229bf7e77b522eda8737374c2f26b30c24b.tar.gz spark-fe578229bf7e77b522eda8737374c2f26b30c24b.tar.bz2 spark-fe578229bf7e77b522eda8737374c2f26b30c24b.zip |
async-profiler on macos
Diffstat (limited to 'spark-nukkit/src/main')
-rw-r--r-- | spark-nukkit/src/main/java/me/lucko/spark/nukkit/NukkitSparkPlugin.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spark-nukkit/src/main/java/me/lucko/spark/nukkit/NukkitSparkPlugin.java b/spark-nukkit/src/main/java/me/lucko/spark/nukkit/NukkitSparkPlugin.java index b2db9f7..c9e099d 100644 --- a/spark-nukkit/src/main/java/me/lucko/spark/nukkit/NukkitSparkPlugin.java +++ b/spark-nukkit/src/main/java/me/lucko/spark/nukkit/NukkitSparkPlugin.java @@ -33,6 +33,7 @@ import cn.nukkit.plugin.service.ServicePriority; import cn.nukkit.scheduler.AsyncTask; import java.nio.file.Path; +import java.util.logging.Level; import java.util.stream.Stream; public class NukkitSparkPlugin extends PluginBase implements SparkPlugin { @@ -89,6 +90,19 @@ public class NukkitSparkPlugin extends PluginBase 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 NukkitClassSourceLookup(); } |