mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Add overload for Throwable
This commit is contained in:
parent
d79f9725bd
commit
721904335d
@ -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.
|
||||
* <br>The message will be prefixed with {@link #getName() <code>[<expansion name>]</code>}
|
||||
*
|
||||
* @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".
|
||||
* <br>The message will be prefixed with {@link #getName() <code>[<expansion name>]</code>}
|
||||
@ -335,6 +347,17 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
|
||||
log(Level.SEVERE, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs the provided message and Throwable with Level "severe" (error).
|
||||
* <br>The message will be prefixed with {@link #getName() <code>[<expansion name>]</code>}
|
||||
*
|
||||
* @param msg The message to log
|
||||
* @param throwable The Throwable to log
|
||||
*/
|
||||
public void severe(String msg, Throwable throwable) {
|
||||
log(Level.SEVERE, msg, throwable);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Whether the provided Object is an instance of this PlaceholderExpansion.
|
||||
|
Loading…
Reference in New Issue
Block a user