java.lang.Object
valorless.valorlessutils.logging.Log

public class Log extends Object
Utility class for writing plugin-prefixed messages to the Minecraft logger.

Each logging method preprocesses text by parsing language/placeholders via ValorlessUtils.getLang() and converting Minecraft formatting to ANSI with McToAnsi.convert(String) before delegating to Logger.getLogger(String).

This class provides convenience wrappers for info, warning, error, and debug logging. Debug logging is controlled per plugin through config.yml using the debug boolean key.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Log()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    debug(org.bukkit.plugin.java.JavaPlugin caller, String msg)
    Logs a debug message when the plugin has debug: true in config.yml.
    static void
    error(org.bukkit.plugin.java.JavaPlugin caller, String msg)
    Logs an error message for the calling plugin.
    static void
    info(org.bukkit.plugin.java.JavaPlugin caller, String msg)
    Logs an informational message for the calling plugin.
    static void
    warning(org.bukkit.plugin.java.JavaPlugin caller, String msg)
    Logs a warning message for the calling plugin.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Log

      public Log()
  • Method Details

    • info

      public static void info(org.bukkit.plugin.java.JavaPlugin caller, String msg)
      Logs an informational message for the calling plugin.

      The message is parsed using the shared language parser and then converted to ANSI before being emitted at Level.INFO.

      Parameters:
      caller - the plugin sending the log
      msg - the message to write
    • warning

      public static void warning(org.bukkit.plugin.java.JavaPlugin caller, String msg)
      Logs a warning message for the calling plugin.

      The message is parsed using the shared language parser and then converted to ANSI before being emitted at Level.WARNING.

      Parameters:
      caller - the plugin sending the log
      msg - the message to write
    • error

      public static void error(org.bukkit.plugin.java.JavaPlugin caller, String msg)
      Logs an error message for the calling plugin.

      The message is parsed using the shared language parser and then converted to ANSI before being emitted at Level.SEVERE.

      Parameters:
      caller - the plugin sending the log
      msg - the message to write
    • debug

      public static void debug(org.bukkit.plugin.java.JavaPlugin caller, String msg)
      Logs a debug message when the plugin has debug: true in config.yml.

      On first use per plugin, this method loads and caches a Config for config.yml. If the file cannot be loaded, the method exits quietly without logging.

      When debug is enabled, the message is parsed and converted to ANSI before being emitted at Level.WARNING with a [DEBUG] prefix.

      This method uses Config.getBool(String) to evaluate the debug toggle.

      Parameters:
      caller - the plugin sending the log
      msg - the debug message to write