Class Logger
java.lang.Object
io.github.lucfr1746.llibrary.util.helper.Logger
A custom logger utility for Minecraft plugins using the Spigot API.
This class allows for standardized logging with support for different log levels
and console messages with color formatting.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Sends a debug message to the console with blue formatting.void
Logs an error message.void
Logs an informational message.void
Sends a success message to the console with green formatting.void
Logs a warning message.
-
Constructor Details
-
Logger
public Logger(org.bukkit.plugin.Plugin plugin) Constructs a Logger associated with a given plugin.- Parameters:
plugin
- The plugin instance this logger is bound to.
-
Logger
Constructs a Logger by looking up a plugin by its name.- Parameters:
pluginName
- The name of the plugin.- Throws:
IllegalArgumentException
- if the plugin cannot be found.
-
-
Method Details
-
info
Logs an informational message.- Parameters:
message
- The message to log at INFO level.
-
warning
Logs a warning message.- Parameters:
message
- The message to log at WARNING level.
-
error
Logs an error message.- Parameters:
message
- The message to log at SEVERE level.
-
success
Sends a success message to the console with green formatting.- Parameters:
message
- The message to display as a success.
-
debug
Sends a debug message to the console with blue formatting.- Parameters:
message
- The message to display for debugging purposes.
-