Package dev.deepcore.logging
Class DeepCoreLogger
java.lang.Object
dev.deepcore.logging.DeepCoreLogger
Centralized logger that sends messages to console and optionally to players.
-
Constructor Summary
ConstructorsConstructorDescriptionDeepCoreLogger(org.bukkit.plugin.java.JavaPlugin plugin) Creates a logger bound to this plugin. -
Method Summary
Modifier and TypeMethodDescriptionvoidclearPlayerLevel(UUID playerId) Clears any explicit log level override for a player UUID.voidLogs a DEBUG message to configured destinations.voiddebugConsole(String message) Logs a DEBUG message to console only.voidLogs an ERROR message to configured destinations.voidLogs an ERROR message with a throwable to configured destinations.voiderrorConsole(String message) Logs an ERROR message to console only.voiderrorConsole(String message, Throwable throwable) Logs an ERROR message with a throwable to console only.getConfiguredPlayerLevel(UUID playerId) getEffectivePlayerLevel(org.bukkit.entity.Player player) voidLogs an INFO message to configured destinations.voidinfoConsole(String message) Logs an INFO message to console only.voidReloads logger behavior from plugin configuration.voidlog(DeepCoreLogLevel level, String message, Throwable throwable) Logs to console and, if enabled, to online players filtered by level.voidsend(org.bukkit.command.CommandSender sender, DeepCoreLogLevel level, String message) Sends a message to one command sender with level formatting.voidSends a DEBUG message to a specific command sender.voidSends an ERROR message to a specific command sender.voidSends an INFO message to a specific command sender.voidSends a WARN message to a specific command sender.voidsetPlayerLevel(UUID playerId, DeepCoreLogLevel level) Assigns an explicit log level override for a player UUID.voidLogs a WARN message to configured destinations.voidwarnConsole(String message) Logs a WARN message to console only.
-
Constructor Details
-
DeepCoreLogger
public DeepCoreLogger(org.bukkit.plugin.java.JavaPlugin plugin) Creates a logger bound to this plugin.- Parameters:
plugin- plugin providing config and console logger access
-
-
Method Details
-
loadFromConfig
public void loadFromConfig()Reloads logger behavior from plugin configuration. -
debug
Logs a DEBUG message to configured destinations.- Parameters:
message- message text to log
-
debugConsole
Logs a DEBUG message to console only.- Parameters:
message- message text to log
-
info
Logs an INFO message to configured destinations.- Parameters:
message- message text to log
-
infoConsole
Logs an INFO message to console only.- Parameters:
message- message text to log
-
warn
Logs a WARN message to configured destinations.- Parameters:
message- message text to log
-
warnConsole
Logs a WARN message to console only.- Parameters:
message- message text to log
-
error
Logs an ERROR message to configured destinations.- Parameters:
message- message text to log
-
errorConsole
Logs an ERROR message to console only.- Parameters:
message- message text to log
-
error
Logs an ERROR message with a throwable to configured destinations.- Parameters:
message- message text to logthrowable- throwable to print alongside the message
-
errorConsole
Logs an ERROR message with a throwable to console only.- Parameters:
message- message text to logthrowable- throwable to print alongside the message
-
sendDebug
Sends a DEBUG message to a specific command sender.- Parameters:
sender- recipient sendermessage- message text to send
-
sendInfo
Sends an INFO message to a specific command sender.- Parameters:
sender- recipient sendermessage- message text to send
-
sendWarn
Sends a WARN message to a specific command sender.- Parameters:
sender- recipient sendermessage- message text to send
-
sendError
Sends an ERROR message to a specific command sender.- Parameters:
sender- recipient sendermessage- message text to send
-
send
Sends a message to one command sender with level formatting.- Parameters:
sender- recipient senderlevel- log severity level for formattingmessage- message text to send
-
log
Logs to console and, if enabled, to online players filtered by level.- Parameters:
level- severity level for routing and formattingmessage- message text to logthrowable- optional throwable to print with the message
-
getEffectivePlayerLevel
-
setPlayerLevel
Assigns an explicit log level override for a player UUID.- Parameters:
playerId- player UUID to configurelevel- override level for that player
-
clearPlayerLevel
Clears any explicit log level override for a player UUID.- Parameters:
playerId- player UUID whose override should be removed
-
getConfiguredPlayerLevel
-