Class JdkLogger

java.lang.Object
org.drasyl.util.logging.JdkLogger
All Implemented Interfaces:
Logger

@UnstableApi public class JdkLogger extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    JdkLogger(Logger logger)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Log a message at the DEBUG level.
    void
    debug(String format, Object arg)
    Log a message at the DEBUG level according to the specified format and argument.
    void
    debug(String format, Object... arguments)
    Log a message at the DEBUG level according to the specified format and arguments.
    void
    debug(String format, Object arg1, Object arg2)
    Log a message at the DEBUG level according to the specified format and arguments.
    void
    Log an exception (throwable) at the DEBUG level with an accompanying message.
    void
    debug(String format, Supplier<Object> supplier)
    Log a message at the DEBUG level according to the specified format and argument supplier.
    final void
    debug(String format, Supplier<Object>... suppliers)
    Log a message at the DEBUG level according to the specified format and argument suppliers.
    void
    debug(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
    Log a message at the DEBUG level according to the specified format and argument suppliers.
    void
    Log an exception (throwable) at the DEBUG level.
     
    void
    Log a message at the ERROR level.
    void
    error(String format, Object arg)
    Log a message at the ERROR level according to the specified format and argument.
    void
    error(String format, Object... arguments)
    Log a message at the ERROR level according to the specified format and arguments.
    void
    error(String format, Object arg1, Object arg2)
    Log a message at the ERROR level according to the specified format and arguments.
    void
    Log an exception (throwable) at the ERROR level with an accompanying message.
    void
    error(String format, Supplier<Object> supplier)
    Log a message at the ERROR level according to the specified format and argument supplier.
    final void
    error(String format, Supplier<Object>... suppliers)
    Log a message at the ERROR level according to the specified format and argument suppliers.
    void
    error(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
    Log a message at the ERROR level according to the specified format and argument suppliers.
    void
    Log an exception (throwable) at the ERROR level.
    void
    info(String msg)
    Log a message at the INFO level.
    void
    info(String format, Object arg)
    Log a message at the INFO level according to the specified format and argument.
    void
    info(String format, Object... arguments)
    Log a message at the INFO level according to the specified format and arguments.
    void
    info(String format, Object arg1, Object arg2)
    Log a message at the INFO level according to the specified format and arguments.
    void
    Log an exception (throwable) at the INFO level with an accompanying message.
    void
    info(String format, Supplier<Object> supplier)
    Log a message at the INFO level according to the specified format and argument supplier.
    final void
    info(String format, Supplier<Object>... suppliers)
    Log a message at the INFO level according to the specified format and argument suppliers.
    void
    info(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
    Log a message at the INFO level according to the specified format and argument suppliers.
    void
    Log an exception (throwable) at the INFO level.
    boolean
    Is the logger instance enabled for the DEBUG level?
    boolean
    Is the logger instance enabled for the specified level?
    boolean
    Is the logger instance enabled for the ERROR level?
    boolean
    Is the logger instance enabled for the INFO level?
    boolean
    Is the logger instance enabled for the TRACE level?
    boolean
    Is the logger instance enabled for the WARN level?
    void
    log(LogLevel level, String msg)
    Log a message at the specified level level.
    void
    log(LogLevel level, String format, Object arg)
    Log a message at the specified level level according to the specified format and argument.
    void
    log(LogLevel level, String format, Object... arguments)
    Log a message at the specified level level according to the specified format and arguments.
    void
    log(LogLevel level, String format, Object arg1, Object arg2)
    Log a message at the specified level level according to the specified format and arguments.
    void
    log(LogLevel level, String msg, Throwable t)
    Log an exception (throwable) at the specified level level with an accompanying message.
    void
    log(LogLevel level, String format, Supplier<Object> supplier)
    Log a message at the specified level level according to the specified format and argument supplier.
    final void
    log(LogLevel level, String format, Supplier<Object>... suppliers)
    Log a message at the specified level level according to the specified format and argument suppliers.
    void
    log(LogLevel level, String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
    Log a message at the specified level level according to the specified format and argument suppliers.
    void
    log(LogLevel level, Throwable t)
    Log an exception (throwable) at the specified level level.
    Return the name of this Logger instance.
    void
    Log a message at the TRACE level.
    void
    trace(String format, Object arg)
    Log a message at the TRACE level according to the specified format and argument.
    void
    trace(String format, Object... arguments)
    Log a message at the TRACE level according to the specified format and arguments.
    void
    trace(String format, Object arg1, Object arg2)
    Log a message at the TRACE level according to the specified format and arguments.
    void
    Log an exception (throwable) at the TRACE level with an accompanying message.
    void
    trace(String format, Supplier<Object> supplier)
    Log a message at the TRACE level according to the specified format and argument supplier.
    final void
    trace(String format, Supplier<Object>... suppliers)
    Log a message at the TRACE level according to the specified format and argument suppliers.
    void
    trace(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
    Log a message at the TRACE level according to the specified format and argument suppliers.
    void
    Log an exception (throwable) at the TRACE level.
    void
    warn(String msg)
    Log a message at the WARN level.
    void
    warn(String format, Object arg)
    Log a message at the WARN level according to the specified format and argument.
    void
    warn(String format, Object... arguments)
    Log a message at the WARN level according to the specified format and arguments.
    void
    warn(String format, Object arg1, Object arg2)
    Log a message at the WARN level according to the specified format and arguments.
    void
    Log an exception (throwable) at the WARN level with an accompanying message.
    void
    warn(String format, Supplier<Object> supplier)
    Log a message at the WARN level according to the specified format and argument supplier.
    final void
    warn(String format, Supplier<Object>... suppliers)
    Log a message at the WARN level according to the specified format and argument suppliers.
    void
    warn(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
    Log a message at the WARN level according to the specified format and argument suppliers.
    void
    Log an exception (throwable) at the WARN level.

    Methods inherited from class java.lang.Object

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

    • JdkLogger

      public JdkLogger(Logger logger)
  • Method Details

    • delegate

      public Logger delegate()
    • isTraceEnabled

      public boolean isTraceEnabled()
      Description copied from interface: Logger
      Is the logger instance enabled for the TRACE level?
      Returns:
      true if this Logger is enabled for the TRACE level, false otherwise.
    • trace

      public void trace(String msg)
      Description copied from interface: Logger
      Log a message at the TRACE level.
      Parameters:
      msg - the message string to be logged
    • trace

      public void trace(String format, Object arg)
      Description copied from interface: Logger
      Log a message at the TRACE level according to the specified format and argument.
      Parameters:
      format - the format string
      arg - the argument
    • trace

      public void trace(String format, Object arg1, Object arg2)
      Description copied from interface: Logger
      Log a message at the TRACE level according to the specified format and arguments.
      Parameters:
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • trace

      public void trace(String format, Object... arguments)
      Description copied from interface: Logger
      Log a message at the TRACE level according to the specified format and arguments.
      Parameters:
      format - the format string
      arguments - a list of 3 or more arguments
    • trace

      public void trace(String msg, Throwable t)
      Description copied from interface: Logger
      Log an exception (throwable) at the TRACE level with an accompanying message.
      Parameters:
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isDebugEnabled

      public boolean isDebugEnabled()
      Description copied from interface: Logger
      Is the logger instance enabled for the DEBUG level?
      Returns:
      true if this Logger is enabled for the DEBUG level, false otherwise.
    • debug

      public void debug(String msg)
      Description copied from interface: Logger
      Log a message at the DEBUG level.
      Parameters:
      msg - the message string to be logged
    • debug

      public void debug(String format, Object arg)
      Description copied from interface: Logger
      Log a message at the DEBUG level according to the specified format and argument.
      Parameters:
      format - the format string
      arg - the argument
    • debug

      public void debug(String format, Object arg1, Object arg2)
      Description copied from interface: Logger
      Log a message at the DEBUG level according to the specified format and arguments.
      Parameters:
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • debug

      public void debug(String format, Object... arguments)
      Description copied from interface: Logger
      Log a message at the DEBUG level according to the specified format and arguments.
      Parameters:
      format - the format string
      arguments - a list of 3 or more arguments
    • debug

      public void debug(String msg, Throwable t)
      Description copied from interface: Logger
      Log an exception (throwable) at the DEBUG level with an accompanying message.
      Parameters:
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isInfoEnabled

      public boolean isInfoEnabled()
      Description copied from interface: Logger
      Is the logger instance enabled for the INFO level?
      Returns:
      true if this Logger is enabled for the INFO level, false otherwise.
    • info

      public void info(String msg)
      Description copied from interface: Logger
      Log a message at the INFO level.
      Parameters:
      msg - the message string to be logged
    • info

      public void info(String format, Object arg)
      Description copied from interface: Logger
      Log a message at the INFO level according to the specified format and argument.
      Parameters:
      format - the format string
      arg - the argument
    • info

      public void info(String format, Object arg1, Object arg2)
      Description copied from interface: Logger
      Log a message at the INFO level according to the specified format and arguments.
      Parameters:
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • info

      public void info(String format, Object... arguments)
      Description copied from interface: Logger
      Log a message at the INFO level according to the specified format and arguments.
      Parameters:
      format - the format string
      arguments - a list of 3 or more arguments
    • info

      public void info(String msg, Throwable t)
      Description copied from interface: Logger
      Log an exception (throwable) at the INFO level with an accompanying message.
      Parameters:
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isWarnEnabled

      public boolean isWarnEnabled()
      Description copied from interface: Logger
      Is the logger instance enabled for the WARN level?
      Returns:
      true if this Logger is enabled for the WARN level, false otherwise.
    • warn

      public void warn(String msg)
      Description copied from interface: Logger
      Log a message at the WARN level.
      Parameters:
      msg - the message string to be logged
    • warn

      public void warn(String format, Object arg)
      Description copied from interface: Logger
      Log a message at the WARN level according to the specified format and argument.
      Parameters:
      format - the format string
      arg - the argument
    • warn

      public void warn(String format, Object arg1, Object arg2)
      Description copied from interface: Logger
      Log a message at the WARN level according to the specified format and arguments.
      Parameters:
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • warn

      public void warn(String format, Object... arguments)
      Description copied from interface: Logger
      Log a message at the WARN level according to the specified format and arguments.
      Parameters:
      format - the format string
      arguments - a list of 3 or more arguments
    • warn

      public void warn(String msg, Throwable t)
      Description copied from interface: Logger
      Log an exception (throwable) at the WARN level with an accompanying message.
      Parameters:
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isErrorEnabled

      public boolean isErrorEnabled()
      Description copied from interface: Logger
      Is the logger instance enabled for the ERROR level?
      Returns:
      true if this Logger is enabled for the ERROR level, false otherwise.
    • error

      public void error(String msg)
      Description copied from interface: Logger
      Log a message at the ERROR level.
      Parameters:
      msg - the message string to be logged
    • error

      public void error(String format, Object arg)
      Description copied from interface: Logger
      Log a message at the ERROR level according to the specified format and argument.
      Parameters:
      format - the format string
      arg - the argument
    • error

      public void error(String format, Object arg1, Object arg2)
      Description copied from interface: Logger
      Log a message at the ERROR level according to the specified format and arguments.
      Parameters:
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • error

      public void error(String format, Object... arguments)
      Description copied from interface: Logger
      Log a message at the ERROR level according to the specified format and arguments.
      Parameters:
      format - the format string
      arguments - a list of 3 or more arguments
    • error

      public void error(String msg, Throwable t)
      Description copied from interface: Logger
      Log an exception (throwable) at the ERROR level with an accompanying message.
      Parameters:
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • name

      public String name()
      Description copied from interface: Logger
      Return the name of this Logger instance.
      Specified by:
      name in interface Logger
      Returns:
      name of this logger instance
    • trace

      public void trace(String format, Supplier<Object> supplier)
      Description copied from interface: Logger
      Log a message at the TRACE level according to the specified format and argument supplier.

      The supplier is not called when the logger is disabled for the TRACE level.

      Specified by:
      trace in interface Logger
      Parameters:
      format - the format string
      supplier - the argument supplier
    • trace

      public void trace(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
      Description copied from interface: Logger
      Log a message at the TRACE level according to the specified format and argument suppliers.

      The suppliers are not called when the logger is disabled for the TRACE level.

      Specified by:
      trace in interface Logger
      Parameters:
      format - the format string
      supplier1 - the first argument supplier
      supplier2 - the second argument supplier
    • trace

      @SafeVarargs public final void trace(String format, Supplier<Object>... suppliers)
      Description copied from interface: Logger
      Log a message at the TRACE level according to the specified format and argument suppliers.

      The suppliers are not called when the logger is disabled for the TRACE level.

      Specified by:
      trace in interface Logger
      Parameters:
      format - the format string
      suppliers - a list of 3 or more argument suppliers
    • trace

      public void trace(Throwable t)
      Description copied from interface: Logger
      Log an exception (throwable) at the TRACE level.
      Specified by:
      trace in interface Logger
      Parameters:
      t - the exception (throwable) to log
    • debug

      public void debug(String format, Supplier<Object> supplier)
      Description copied from interface: Logger
      Log a message at the DEBUG level according to the specified format and argument supplier.

      The supplier is not called when the logger is disabled for the DEBUG level.

      Specified by:
      debug in interface Logger
      Parameters:
      format - the format string
      supplier - the argument supplier
    • debug

      public void debug(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
      Description copied from interface: Logger
      Log a message at the DEBUG level according to the specified format and argument suppliers.

      The suppliers are not called when the logger is disabled for the DEBUG level.

      Specified by:
      debug in interface Logger
      Parameters:
      format - the format string
      supplier1 - the first argument supplier
      supplier2 - the second argument supplier
    • debug

      @SafeVarargs public final void debug(String format, Supplier<Object>... suppliers)
      Description copied from interface: Logger
      Log a message at the DEBUG level according to the specified format and argument suppliers.

      The suppliers are not called when the logger is disabled for the DEBUG level.

      Specified by:
      debug in interface Logger
      Parameters:
      format - the format string
      suppliers - a list of 3 or more argument suppliers
    • debug

      public void debug(Throwable t)
      Description copied from interface: Logger
      Log an exception (throwable) at the DEBUG level.
      Specified by:
      debug in interface Logger
      Parameters:
      t - the exception (throwable) to log
    • info

      public void info(String format, Supplier<Object> supplier)
      Description copied from interface: Logger
      Log a message at the INFO level according to the specified format and argument supplier.

      The supplier is not called when the logger is disabled for the INFO level.

      Specified by:
      info in interface Logger
      Parameters:
      format - the format string
      supplier - the argument supplier
    • info

      public void info(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
      Description copied from interface: Logger
      Log a message at the INFO level according to the specified format and argument suppliers.

      The suppliers are not called when the logger is disabled for the INFO level.

      Specified by:
      info in interface Logger
      Parameters:
      format - the format string
      supplier1 - the first argument supplier
      supplier2 - the second argument supplier
    • info

      @SafeVarargs public final void info(String format, Supplier<Object>... suppliers)
      Description copied from interface: Logger
      Log a message at the INFO level according to the specified format and argument suppliers.

      The suppliers are not called when the logger is disabled for the INFO level.

      Specified by:
      info in interface Logger
      Parameters:
      format - the format string
      suppliers - a list of 3 or more argument suppliers
    • info

      public void info(Throwable t)
      Description copied from interface: Logger
      Log an exception (throwable) at the INFO level.
      Specified by:
      info in interface Logger
      Parameters:
      t - the exception (throwable) to log
    • warn

      public void warn(String format, Supplier<Object> supplier)
      Description copied from interface: Logger
      Log a message at the WARN level according to the specified format and argument supplier.

      The supplier is not called when the logger is disabled for the WARN level.

      Specified by:
      warn in interface Logger
      Parameters:
      format - the format string
      supplier - the argument supplier
    • warn

      public void warn(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
      Description copied from interface: Logger
      Log a message at the WARN level according to the specified format and argument suppliers.

      The suppliers are not called when the logger is disabled for the WARN level.

      Specified by:
      warn in interface Logger
      Parameters:
      format - the format string
      supplier1 - the first argument supplier
      supplier2 - the second argument supplier
    • warn

      @SafeVarargs public final void warn(String format, Supplier<Object>... suppliers)
      Description copied from interface: Logger
      Log a message at the WARN level according to the specified format and argument suppliers.

      The suppliers are not called when the logger is disabled for the WARN level.

      Specified by:
      warn in interface Logger
      Parameters:
      format - the format string
      suppliers - a list of 3 or more argument suppliers
    • warn

      public void warn(Throwable t)
      Description copied from interface: Logger
      Log an exception (throwable) at the WARN level.
      Specified by:
      warn in interface Logger
      Parameters:
      t - the exception (throwable) to log
    • error

      public void error(String format, Supplier<Object> supplier)
      Description copied from interface: Logger
      Log a message at the ERROR level according to the specified format and argument supplier.

      The supplier is not called when the logger is disabled for the ERROR level.

      Specified by:
      error in interface Logger
      Parameters:
      format - the format string
      supplier - the argument supplier
    • error

      public void error(String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
      Description copied from interface: Logger
      Log a message at the ERROR level according to the specified format and argument suppliers.

      The suppliers are not called when the logger is disabled for the ERROR level.

      Specified by:
      error in interface Logger
      Parameters:
      format - the format string
      supplier1 - the first argument supplier
      supplier2 - the second argument supplier
    • error

      @SafeVarargs public final void error(String format, Supplier<Object>... suppliers)
      Description copied from interface: Logger
      Log a message at the ERROR level according to the specified format and argument suppliers.

      The suppliers are not called when the logger is disabled for the ERROR level.

      Specified by:
      error in interface Logger
      Parameters:
      format - the format string
      suppliers - a list of 3 or more argument suppliers
    • error

      public void error(Throwable t)
      Description copied from interface: Logger
      Log an exception (throwable) at the ERROR level.
      Specified by:
      error in interface Logger
      Parameters:
      t - the exception (throwable) to log
    • isEnabled

      public boolean isEnabled(LogLevel level)
      Description copied from interface: Logger
      Is the logger instance enabled for the specified level?
      Specified by:
      isEnabled in interface Logger
      Parameters:
      level - the log level
      Returns:
      true if this Logger is enabled for the specified level, false otherwise.
    • log

      public void log(LogLevel level, String msg)
      Description copied from interface: Logger
      Log a message at the specified level level.
      Specified by:
      log in interface Logger
      Parameters:
      level - the log level
      msg - the message string to be logged
    • log

      public void log(LogLevel level, String format, Object arg)
      Description copied from interface: Logger
      Log a message at the specified level level according to the specified format and argument.
      Specified by:
      log in interface Logger
      Parameters:
      level - the log level
      format - the format string
      arg - the argument
    • log

      public void log(LogLevel level, String format, Supplier<Object> supplier)
      Description copied from interface: Logger
      Log a message at the specified level level according to the specified format and argument supplier.

      The supplier is not called when the logger is disabled for the specified level level.

      Specified by:
      log in interface Logger
      Parameters:
      level - the log level
      format - the format string
      supplier - the argument supplier
    • log

      public void log(LogLevel level, String format, Object arg1, Object arg2)
      Description copied from interface: Logger
      Log a message at the specified level level according to the specified format and arguments.
      Specified by:
      log in interface Logger
      Parameters:
      level - the log level
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • log

      public void log(LogLevel level, String format, Supplier<Object> supplier1, Supplier<Object> supplier2)
      Description copied from interface: Logger
      Log a message at the specified level level according to the specified format and argument suppliers.

      The suppliers are not called when the logger is disabled for the specified level level.

      Specified by:
      log in interface Logger
      Parameters:
      level - the log level
      format - the format string
      supplier1 - the first argument supplier
      supplier2 - the second argument supplier
    • log

      public void log(LogLevel level, String format, Object... arguments)
      Description copied from interface: Logger
      Log a message at the specified level level according to the specified format and arguments.
      Specified by:
      log in interface Logger
      Parameters:
      level - the log level
      format - the format string
      arguments - a list of 3 or more arguments
    • log

      @SafeVarargs public final void log(LogLevel level, String format, Supplier<Object>... suppliers)
      Description copied from interface: Logger
      Log a message at the specified level level according to the specified format and argument suppliers.

      The suppliers are not called when the logger is disabled for the specified level level.

      Specified by:
      log in interface Logger
      Parameters:
      level - the log level
      format - the format string
      suppliers - a list of 3 or more argument suppliers
    • log

      public void log(LogLevel level, String msg, Throwable t)
      Description copied from interface: Logger
      Log an exception (throwable) at the specified level level with an accompanying message.
      Specified by:
      log in interface Logger
      Parameters:
      level - the log level
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • log

      public void log(LogLevel level, Throwable t)
      Description copied from interface: Logger
      Log an exception (throwable) at the specified level level.
      Specified by:
      log in interface Logger
      Parameters:
      level - the log level
      t - the exception (throwable) to log