Module glf.api

Interface Logger

All Known Subinterfaces:
LocationLogger
All Known Implementing Classes:
AbstractLogger, DefaultLogger, LegacyAbstractLogger

public interface Logger
The org.seppiko.glf.api.Logger interface is the main user entry point of GLF API. It is expected that logging takes place through concrete implementations of this interface.
Author:
Leonard Woo
  • Field Details

    • ROOT_LOGGER_NAME

      static final String ROOT_LOGGER_NAME
      Case-insensitive String constant used to retrieve the name of the root logger.
      See Also:
  • Method Details

    • getName

      String getName()
      Return the name of this Logger instance.
      Returns:
      name of this logger instance.
    • atLevel

      LoggerEventBuilder atLevel(Level level)
      Make a new LoggerEventBuilder instance as appropriate for this logger and the desired Level passed as parameter. If this Logger is disabled for the given Level, then a NOPLoggerEventBuilder is returned.
      Parameters:
      level - desired level for the event builder.
      Returns:
      a new LoggerEventBuilder instance as appropriate for this logger.
    • isEnable

      boolean isEnable(Level level)
      Returns whether this Logger is enabled for a given Level.
      Parameters:
      level - The level to take into consideration.
      Returns:
      true if enabled, false otherwise.
    • isEnable

      boolean isEnable(Level level, Marker marker)
      Returns whether this Logger is enabled for a given Level and Marker.
      Parameters:
      level - The level to take into consideration.
      marker - The marker data to take into consideration.
      Returns:
      true if enabled, false otherwise.
    • isTraceEnabled

      boolean isTraceEnabled()
      Is the logger instance enabled for the TRACE level?
      Returns:
      True if this Logger is enabled for the TRACE level, false otherwise.
    • isTraceEnabled

      boolean isTraceEnabled(Marker marker)
      Similar to isTraceEnabled() method except that the marker data is also taken into account.
      Parameters:
      marker - The marker data to take into consideration.
      Returns:
      True if this Logger is enabled for the TRACE level, false otherwise.
    • trace

      void trace(String message)
      Log a message at the TRACE level according to the specified format and arguments.
      Parameters:
      message - the message string to be logged.
    • trace

      void trace(String message, Object param)
      Log a message at the TRACE level according to the specified format and argument.
      Parameters:
      message - the message string to be logged.
      param - the argument.
    • trace

      void trace(String message, Object... params)
      Log a message at the TRACE level according to the specified format and arguments.
      Parameters:
      message - the message string to be logged.
      params - an array of arguments.
    • trace

      void trace(String message, Throwable cause)
      Log an exception (throwable) at the TRACE level with an accompanying message.
      Parameters:
      message - the message string to be logged.
      cause - the exception (throwable) to log.
    • trace

      void trace(String message, Object param, Throwable cause)
      Log a message at the TRACE level according to the specified format and argument and an exception (throwable) with an accompanying message.
      Parameters:
      message - the message string to be logged.
      param - the argument.
      cause - the exception (throwable) to log.
    • trace

      void trace(String message, Object[] params, Throwable cause)
      Log a message at the TRACE level according to the specified format and arguments and an exception (throwable) with an accompanying message.
      Parameters:
      message - the message string to be logged.
      params - an array of arguments.
      cause - the exception (throwable) to log.
    • trace

      void trace(Marker marker, String message)
      Log a message with the specific Marker at the TRACE level.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
    • trace

      void trace(Marker marker, String message, Object param)
      This method is similar to trace(String, Object) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      param - the argument.
    • trace

      void trace(Marker marker, String message, Object... params)
      This method is similar to trace(String, Object...) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      params - an array of arguments.
    • trace

      void trace(Marker marker, String message, Throwable cause)
      This method is similar to trace(String, Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      cause - the exception (throwable) to log.
    • trace

      void trace(Marker marker, String message, Object param, Throwable cause)
      This method is similar to trace(String, Object, Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      param - the argument.
      cause - the exception (throwable) to log.
    • trace

      void trace(Marker marker, String message, Object[] params, Throwable cause)
      This method is similar to trace(String, Object[], Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      params - an array of arguments.
      cause - the exception (throwable) to log.
    • atTrace

      Entry point for fluent-logging for Level.TRACE level.
      Returns:
      LoggingEventBuilder instance as appropriate for level TRACE
    • isDebugEnabled

      boolean isDebugEnabled()
      Is the logger instance enabled for the DEBUG level?
      Returns:
      True if this Logger is enabled for the DEBUG level, false otherwise.
    • isDebugEnabled

      boolean isDebugEnabled(Marker marker)
      Similar to isDebugEnabled() method except that the marker data is also taken into account.
      Parameters:
      marker - The marker data to take into consideration.
      Returns:
      True if this Logger is enabled for the DEBUG level, false otherwise.
    • debug

      void debug(String message)
      Log a message at the DEBUG level according to the specified format and arguments.
      Parameters:
      message - the message string to be logged.
    • debug

      void debug(String message, Object param)
      Log a message at the DEBUG level according to the specified format and argument.
      Parameters:
      message - the message string to be logged.
      param - the argument.
    • debug

      void debug(String message, Object... params)
      Log a message at the DEBUG level according to the specified format and arguments.
      Parameters:
      message - the message string to be logged.
      params - an array of arguments.
    • debug

      void debug(String message, Throwable cause)
      Log an exception (throwable) at the DEBUG level with an accompanying message.
      Parameters:
      message - the message string to be logged.
      cause - the exception (throwable) to log.
    • debug

      void debug(String message, Object param, Throwable cause)
      Log a message at the DEBUG level according to the specified format and argument and an exception (throwable) with an accompanying message.
      Parameters:
      message - the message string to be logged.
      param - the argument.
      cause - the exception (throwable) to log.
    • debug

      void debug(String message, Object[] params, Throwable cause)
      Log a message at the DEBUG level according to the specified format and arguments and an exception (throwable) with an accompanying message.
      Parameters:
      message - the message string to be logged.
      params - an array of arguments.
      cause - the exception (throwable) to log.
    • debug

      void debug(Marker marker, String message)
      Log a message with the specific Marker at the DEBUG level.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
    • debug

      void debug(Marker marker, String message, Object param)
      This method is similar to debug(String, Object) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      param - the argument.
    • debug

      void debug(Marker marker, String message, Object... params)
      This method is similar to debug(String, Object...) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      params - an array of arguments.
    • debug

      void debug(Marker marker, String message, Throwable cause)
      This method is similar to debug(String, Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      cause - the exception (throwable) to log.
    • debug

      void debug(Marker marker, String message, Object param, Throwable cause)
      This method is similar to debug(String, Object, Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      param - the argument.
      cause - the exception (throwable) to log.
    • debug

      void debug(Marker marker, String message, Object[] params, Throwable cause)
      This method is similar to debug(String, Object[], Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      params - an array of arguments.
      cause - the exception (throwable) to log.
    • atDebug

      Entry point for fluent-logging for Level.DEBUG level.
      Returns:
      LoggingEventBuilder instance as appropriate for level DEBUG
    • isInfoEnabled

      boolean isInfoEnabled()
      Is the logger instance enabled for the INFO level?
      Returns:
      True if this Logger is enabled for the INFO level, false otherwise.
    • isInfoEnabled

      boolean isInfoEnabled(Marker marker)
      Similar to isInfoEnabled() method except that the marker data is also taken into account.
      Parameters:
      marker - The marker data to take into consideration.
      Returns:
      True if this Logger is enabled for the INFO level, false otherwise.
    • info

      void info(String message)
      Log a message at the INFO level according to the specified format and arguments.
      Parameters:
      message - the message string to be logged.
    • info

      void info(String message, Object param)
      Log a message at the INFO level according to the specified format and argument.
      Parameters:
      message - the message string to be logged.
      param - the argument.
    • info

      void info(String message, Object... params)
      Log a message at the INFO level according to the specified format and arguments.
      Parameters:
      message - the message string to be logged.
      params - an array of arguments.
    • info

      void info(String message, Throwable cause)
      Log an exception (throwable) at the INFO level with an accompanying message.
      Parameters:
      message - the message string to be logged.
      cause - the exception (throwable) to log.
    • info

      void info(String message, Object param, Throwable cause)
      Log a message at the INFO level according to the specified format and argument and an exception (throwable) with an accompanying message.
      Parameters:
      message - the message string to be logged.
      param - the argument.
      cause - the exception (throwable) to log.
    • info

      void info(String message, Object[] params, Throwable cause)
      Log a message at the INFO level according to the specified format and arguments and an exception (throwable) with an accompanying message.
      Parameters:
      message - the message string to be logged.
      params - an array of arguments.
      cause - the exception (throwable) to log.
    • info

      void info(Marker marker, String message)
      Log a message with the specific Marker at the INFO level.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
    • info

      void info(Marker marker, String message, Object param)
      This method is similar to info(String, Object) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      param - the argument.
    • info

      void info(Marker marker, String message, Object... params)
      This method is similar to info(String, Object...) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      params - an array of arguments.
    • info

      void info(Marker marker, String message, Throwable cause)
      This method is similar to info(String, Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      cause - the exception (throwable) to log.
    • info

      void info(Marker marker, String message, Object param, Throwable cause)
      This method is similar to info(String, Object, Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      param - the argument.
      cause - the exception (throwable) to log.
    • info

      void info(Marker marker, String message, Object[] params, Throwable cause)
      This method is similar to info(String, Object[], Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      params - an array of arguments.
      cause - the exception (throwable) to log.
    • atInfo

      Entry point for fluent-logging for Level.INFO level.
      Returns:
      LoggingEventBuilder instance as appropriate for level INFO
    • isWarnEnabled

      boolean isWarnEnabled()
      Is the logger instance enabled for the WARN level?
      Returns:
      True if this Logger is enabled for the WARN level, false otherwise.
    • isWarnEnabled

      boolean isWarnEnabled(Marker marker)
      Similar to isWarnEnabled() method except that the marker data is also taken into account.
      Parameters:
      marker - The marker data to take into consideration.
      Returns:
      True if this Logger is enabled for the WARN level, false otherwise.
    • warn

      void warn(String message)
      Log a message at the WARN level according to the specified format and arguments.
      Parameters:
      message - the message string to be logged.
    • warn

      void warn(String message, Object param)
      Log a message at the WARN level according to the specified format and argument.
      Parameters:
      message - the message string to be logged.
      param - the argument.
    • warn

      void warn(String message, Object... params)
      Log a message at the WARN level according to the specified format and arguments.
      Parameters:
      message - the message string to be logged.
      params - an array of arguments.
    • warn

      void warn(String message, Throwable cause)
      Log an exception (throwable) at the WARN level with an accompanying message.
      Parameters:
      message - the message string to be logged.
      cause - the exception (throwable) to log.
    • warn

      void warn(String message, Object param, Throwable cause)
      Log a message at the WARN level according to the specified format and argument and an exception (throwable) with an accompanying message.
      Parameters:
      message - the message string to be logged.
      param - the argument.
      cause - the exception (throwable) to log.
    • warn

      void warn(String message, Object[] params, Throwable cause)
      Log a message at the WARN level according to the specified format and arguments and an exception (throwable) with an accompanying message.
      Parameters:
      message - the message string to be logged.
      params - an array of arguments.
      cause - the exception (throwable) to log.
    • warn

      void warn(Marker marker, String message)
      Log a message with the specific Marker at the WARN level.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
    • warn

      void warn(Marker marker, String message, Object param)
      This method is similar to warn(String, Object) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      param - the argument.
    • warn

      void warn(Marker marker, String message, Object... params)
      This method is similar to warn(String, Object...) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      params - an array of arguments.
    • warn

      void warn(Marker marker, String message, Throwable cause)
      This method is similar to warn(String, Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      cause - the exception (throwable) to log.
    • warn

      void warn(Marker marker, String message, Object param, Throwable cause)
      This method is similar to warn(String, Object, Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      param - the argument.
      cause - the exception (throwable) to log.
    • warn

      void warn(Marker marker, String message, Object[] params, Throwable cause)
      This method is similar to warn(String, Object[], Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      params - an array of arguments.
      cause - the exception (throwable) to log.
    • atWarn

      Entry point for fluent-logging for Level.WARN level.
      Returns:
      LoggingEventBuilder instance as appropriate for level WARN
    • isErrorEnabled

      boolean isErrorEnabled()
      Is the logger instance enabled for the ERROR level?
      Returns:
      True if this Logger is enabled for the ERROR level, false otherwise.
    • isErrorEnabled

      boolean isErrorEnabled(Marker marker)
      Similar to isErrorEnabled() method except that the marker data is also taken into account.
      Parameters:
      marker - The marker data to take into consideration.
      Returns:
      True if this Logger is enabled for the ERROR level, false otherwise.
    • error

      void error(String message)
      Log a message at the ERROR level according to the specified format and arguments.
      Parameters:
      message - the message string to be logged.
    • error

      void error(String message, Object param)
      Log a message at the ERROR level according to the specified format and argument.
      Parameters:
      message - the message string to be logged.
      param - the argument.
    • error

      void error(String message, Object... params)
      Log a message at the ERROR level according to the specified format and arguments.
      Parameters:
      message - the message string to be logged.
      params - an array of arguments.
    • error

      void error(String message, Throwable cause)
      Log an exception (throwable) at the ERROR level with an accompanying message.
      Parameters:
      message - the message string to be logged.
      cause - the exception (throwable) to log.
    • error

      void error(String message, Object param, Throwable cause)
      Log a message at the ERROR level according to the specified format and argument and an exception (throwable) with an accompanying message.
      Parameters:
      message - the message string to be logged.
      param - the argument.
      cause - the exception (throwable) to log.
    • error

      void error(String message, Object[] params, Throwable cause)
      Log a message at the ERROR level according to the specified format and arguments and an exception (throwable) with an accompanying message.
      Parameters:
      message - the message string to be logged.
      params - an array of arguments.
      cause - the exception (throwable) to log.
    • error

      void error(Marker marker, String message)
      Log a message with the specific Marker at the ERROR level.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
    • error

      void error(Marker marker, String message, Object param)
      This method is similar to error(String, Object) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      param - the argument.
    • error

      void error(Marker marker, String message, Object... params)
      This method is similar to error(String, Object...) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      params - an array of arguments.
    • error

      void error(Marker marker, String message, Throwable cause)
      This method is similar to error(String, Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      cause - the exception (throwable) to log.
    • error

      void error(Marker marker, String message, Object param, Throwable cause)
      This method is similar to error(String, Object, Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      param - the argument.
      cause - the exception (throwable) to log.
    • error

      void error(Marker marker, String message, Object[] params, Throwable cause)
      This method is similar to error(String, Object[], Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      params - an array of arguments.
      cause - the exception (throwable) to log.
    • atError

      Entry point for fluent-logging for Level.ERROR level.
      Returns:
      LoggingEventBuilder instance as appropriate for level ERROR
    • isFatalEnabled

      boolean isFatalEnabled()
      Is the logger instance enabled for the FATAL level?
      Returns:
      True if this Logger is enabled for the FATAL level, false otherwise.
    • isFatalEnabled

      boolean isFatalEnabled(Marker marker)
      Similar to isFatalEnabled() method except that the marker data is also taken into account.
      Parameters:
      marker - The marker data to take into consideration.
      Returns:
      True if this Logger is enabled for the FATAL level, false otherwise.
    • fatal

      void fatal(String message)
      Log a message at the FATAL level according to the specified format and arguments.
      Parameters:
      message - the message string to be logged.
    • fatal

      void fatal(String message, Object param)
      Log a message at the FATAL level according to the specified format and argument.
      Parameters:
      message - the message string to be logged.
      param - the argument.
    • fatal

      void fatal(String message, Object... params)
      Log a message at the FATAL level according to the specified format and arguments.
      Parameters:
      message - the message string to be logged.
      params - an array of arguments.
    • fatal

      void fatal(String message, Throwable cause)
      Log an exception (throwable) at the FATAL level with an accompanying message.
      Parameters:
      message - the message string to be logged.
      cause - the exception (throwable) to log.
    • fatal

      void fatal(String message, Object param, Throwable cause)
      Log a message at the FATAL level according to the specified format and argument and an exception (throwable) with an accompanying message.
      Parameters:
      message - the message string to be logged.
      param - the argument.
      cause - the exception (throwable) to log.
    • fatal

      void fatal(String message, Object[] params, Throwable cause)
      Log a message at the FATAL level according to the specified format and arguments and an exception (throwable) with an accompanying message.
      Parameters:
      message - the message string to be logged.
      params - an array of arguments.
      cause - the exception (throwable) to log.
    • fatal

      void fatal(Marker marker, String message)
      Log a message with the specific Marker at the FATAL level.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
    • fatal

      void fatal(Marker marker, String message, Object param)
      This method is similar to fatal(String, Object) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      param - the argument.
    • fatal

      void fatal(Marker marker, String message, Object... params)
      This method is similar to fatal(String, Object...) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      params - an array of arguments.
    • fatal

      void fatal(Marker marker, String message, Throwable cause)
      This method is similar to fatal(String, Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      cause - the exception (throwable) to log.
    • fatal

      void fatal(Marker marker, String message, Object param, Throwable cause)
      This method is similar to fatal(String, Object, Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      param - the argument.
      cause - the exception (throwable) to log.
    • fatal

      void fatal(Marker marker, String message, Object[] params, Throwable cause)
      This method is similar to fatal(String, Object[], Throwable) method except that the marker data is also taken into consideration.
      Parameters:
      marker - the marker data specific to this log statement.
      message - the message string to be logged.
      params - an array of arguments.
      cause - the exception (throwable) to log.
    • atFatal

      Entry point for fluent-logging for Level.FATAL level.
      Returns:
      LoggingEventBuilder instance as appropriate for level FATAL