com.holonplatform.core.internal

## Interface Logger

- All Superinterfaces:
    Serializable
  All Known Implementing Classes:
    JulLogger, SLF4JLogger

      public interface Logger
      extends Serializable

  Logger service.
  Since:
    5.0.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `Logger.Level` Log levels

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `SLF4J_PRESENT` Whether QueryDSL is available from classpath of current ClassLoader

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Logger` | `create(String loggerName)` Create a default logger instance.
    `default void` | `debug(Supplier<String> messageSupplier)` Log a `Logger.Level.DEBUG` type message, if debug log level is enabled.
    `default void` | `debug(Supplier<String> messageSupplier, Throwable throwable)` Log a `Logger.Level.DEBUG` type message and exception, if debug log level is enabled.
    `default void` | `error(String message)` Log a `Logger.Level.ERROR` type message.
    `default void` | `error(String message, Throwable throwable)` Log a `Logger.Level.ERROR` type message and exception.
    `default void` | `info(String message)` Log a `Logger.Level.INFORMATION` type message.
    `default void` | `info(String message, Throwable throwable)` Log a `Logger.Level.INFORMATION` type message and exception.
    `boolean` | `isEnabled(Logger.Level level)` Check whether given log level is enabled
    `void` | `log(Logger.Level level, String message)` Log a message
    `void` | `log(Logger.Level level, String message, Throwable throwable)` Log a message and a `Throwable` exception.
    `default void` | `warn(String message)` Log a `Logger.Level.WARNING` type message.
    `default void` | `warn(String message, Throwable throwable)` Log a `Logger.Level.WARNING` type message and exception.

- - ### Field Detail

    - #### SLF4J_PRESENT

          static final boolean SLF4J_PRESENT

      Whether QueryDSL is available from classpath of current ClassLoader

  - ### Method Detail

    - #### log

          void log(Logger.Level level,
                   String message)

      Log a message
      Parameters:
        `level` - Log level (not null)
        `message` - Message to log

    - #### log

          void log(Logger.Level level,
                   String message,
                   Throwable throwable)

      Log a message and a `Throwable` exception.
      Parameters:
        `level` - Log level (not null)
        `message` - Message to log
        `throwable` - Exception to log

    - #### isEnabled

          boolean isEnabled(Logger.Level level)

      Check whether given log level is enabled
      Parameters:
        `level` - Level to check
      Returns:
        `true` if enabled, `false` otherwise

    - #### info

          default void info(String message)

      Log a `Logger.Level.INFORMATION` type message.
      Parameters:
        `message` - Message to log

    - #### info

          default void info(String message,
                            Throwable throwable)

      Log a `Logger.Level.INFORMATION` type message and exception.
      Parameters:
        `message` - Message to log
        `throwable` - Exception to log

    - #### warn

          default void warn(String message)

      Log a `Logger.Level.WARNING` type message.
      Parameters:
        `message` - Message to log

    - #### warn

          default void warn(String message,
                            Throwable throwable)

      Log a `Logger.Level.WARNING` type message and exception.
      Parameters:
        `message` - Message to log
        `throwable` - Exception to log

    - #### error

          default void error(String message)

      Log a `Logger.Level.ERROR` type message.
      Parameters:
        `message` - Message to log

    - #### error

          default void error(String message,
                             Throwable throwable)

      Log a `Logger.Level.ERROR` type message and exception.
      Parameters:
        `message` - Message to log
        `throwable` - Exception to log

    - #### debug

          default void debug(Supplier<String> messageSupplier)

      Log a `Logger.Level.DEBUG` type message, if debug log level is enabled.
      Parameters:
        `messageSupplier` - Message supplier (not null)

    - #### debug

          default void debug(Supplier<String> messageSupplier,
                             Throwable throwable)

      Log a `Logger.Level.DEBUG` type message and exception, if debug log level is enabled.
      Parameters:
        `messageSupplier` - Message supplier (not null)
        `throwable` - Exception to log

    - #### create

          static Logger create(String loggerName)

      Create a default logger instance.
      Parameters:
        `loggerName` - Logger name (not null)
      Returns:
        New logger

Copyright © 2019 The Holon Platform. All rights reserved.