diff --git a/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java b/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java index 8d5ec15..907dc61 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java +++ b/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java @@ -305,6 +305,18 @@ public abstract class PlaceholderExpansion extends PlaceholderHook { getPlaceholderAPI().getLogger().log(level, "[" + getName() + "] " + msg); } + /** + * Logs the provided message and Throwable with the provided Level in the console. + *
The message will be prefixed with {@link #getName() [<expansion name>]} + * + * @param level The Level at which the message should be logged with + * @param msg The message to log + * @param throwable The Throwable to log + */ + public void log(Level level, String msg, Throwable throwable) { + getPlaceholderAPI().getLogger().log(level, msg, throwable); + } + /** * Logs the provided message with Level "info". *
The message will be prefixed with {@link #getName() [<expansion name>]} @@ -334,6 +346,17 @@ public abstract class PlaceholderExpansion extends PlaceholderHook { public void severe(String msg) { log(Level.SEVERE, msg); } + + /** + * Logs the provided message and Throwable with Level "severe" (error). + *
The message will be prefixed with {@link #getName() [<expansion name>]} + * + * @param msg The message to log + * @param throwable The Throwable to log + */ + public void severe(String msg, Throwable throwable) { + log(Level.SEVERE, msg, throwable); + } /**