Skip to content
Larrox edited this page Aug 29, 2025 · 1 revision

The Logger class in LarroxUtilsAPI is a simple utility for sending formatted log messages to the server console.
It provides methods to log info, warnings, and errors with a consistent [LarroxUtilsAPI] prefix, making your plugin output more organized and easy to read.


Note

Don’t forget to import:

import dev.larrox.Logger;

🚀 Features

  • Log informational messages.
  • Log warnings to indicate potential issues.
  • Log errors for severe problems.
  • Automatically prepends [LarroxUtilsAPI] to all messages for clarity.

🛠️ Examples

Log an info message

Logger.info("Plugin has been enabled!");

Log a warning

Logger.warn("This feature is deprecated!");

Log an error

Logger.error("Something went wrong while loading the configuration!");

✅ Best Practices

  • Use Logger.info() for general plugin events and messages.
  • Use Logger.warn() for issues that don’t stop the plugin but might need attention.
  • Use Logger.error() for serious problems that may break functionality.
  • Always include descriptive messages to make debugging easier.

Clone this wiki locally