Class LoggerAdapterAbstract

java.lang.Object
org.spongepowered.asm.logging.LoggerAdapterAbstract
All Implemented Interfaces:
ILogger
Direct Known Subclasses:
LoggerAdapterConsole, LoggerAdapterDefault, LoggerAdapterJava

public abstract class LoggerAdapterAbstract extends Object implements ILogger
Abstract base adapter which contains a convenience class for formatting log4j2-style messages and also routes all level-specific overloads to calls to log, which can simplify some implementations.
  • Constructor Details

    • LoggerAdapterAbstract

      protected LoggerAdapterAbstract(String id)
      Parameters:
      id - Logger id
  • Method Details

    • getId

      public String getId()
      Get the id of this logger
      Specified by:
      getId in interface ILogger
    • catching

      public void catching(Throwable t)
      Description copied from interface: ILogger
      Logs an exception or error that has been caught.
      Specified by:
      catching in interface ILogger
      Parameters:
      t - The Throwable.
    • debug

      public void debug(String message, Object... params)
      Description copied from interface: ILogger
      Logs a message with parameters at the DEBUG level.
      Specified by:
      debug in interface ILogger
      Parameters:
      message - the message to log
      params - parameters to the message
    • debug

      public void debug(String message, Throwable t)
      Description copied from interface: ILogger
      Logs a message at the DEBUG level including the stack trace of the Throwable t passed as parameter.
      Specified by:
      debug in interface ILogger
      Parameters:
      message - the message to log
      t - the exception to log, including its stack trace
    • error

      public void error(String message, Object... params)
      Description copied from interface: ILogger
      Logs a message with parameters at the ERROR level
      Specified by:
      error in interface ILogger
      Parameters:
      message - the message to log
      params - parameters to the message
    • error

      public void error(String message, Throwable t)
      Description copied from interface: ILogger
      Logs a message at the ERROR level including the stack trace of the Throwable t passed as parameter.
      Specified by:
      error in interface ILogger
      Parameters:
      message - the message object to log
      t - the exception to log, including its stack trace
    • fatal

      public void fatal(String message, Object... params)
      Description copied from interface: ILogger
      Logs a message with parameters at the FATAL level.
      Specified by:
      fatal in interface ILogger
      Parameters:
      message - the message to log
      params - parameters to the message
    • fatal

      public void fatal(String message, Throwable t)
      Description copied from interface: ILogger
      Logs a message at the FATAL level including the stack trace of the Throwable t passed as parameter.
      Specified by:
      fatal in interface ILogger
      Parameters:
      message - the message object to log
      t - the exception to log, including its stack trace
    • info

      public void info(String message, Object... params)
      Description copied from interface: ILogger
      Logs a message with parameters at the INFO level.
      Specified by:
      info in interface ILogger
      Parameters:
      message - the message to log
      params - parameters to the message
    • info

      public void info(String message, Throwable t)
      Description copied from interface: ILogger
      Logs a message at the INFO level including the stack trace of the Throwable t passed as parameter.
      Specified by:
      info in interface ILogger
      Parameters:
      message - the message object to log
      t - the exception to log, including its stack trace
    • trace

      public void trace(String message, Object... params)
      Description copied from interface: ILogger
      Logs a message with parameters at the TRACE level.
      Specified by:
      trace in interface ILogger
      Parameters:
      message - the message to log
      params - parameters to the message
    • trace

      public void trace(String message, Throwable t)
      Description copied from interface: ILogger
      Logs a message at the TRACE level including the stack trace of the Throwable t passed as parameter.
      Specified by:
      trace in interface ILogger
      Parameters:
      message - the message object to log
      t - the exception to log, including its stack trace
    • warn

      public void warn(String message, Object... params)
      Description copied from interface: ILogger
      Logs a message with parameters at the WARN level.
      Specified by:
      warn in interface ILogger
      Parameters:
      message - the message to log
      params - parameters to the message
    • warn

      public void warn(String message, Throwable t)
      Description copied from interface: ILogger
      Logs a message at the WARN level including the stack trace of the Throwable t passed as parameter.
      Specified by:
      warn in interface ILogger
      Parameters:
      message - the message object to log
      t - the exception to log, including its stack trace