Class DetailLogger

java.lang.Object
jp.ecuacion.lib.core.logging.internal.AbstractLogger
jp.ecuacion.lib.core.logging.DetailLogger

public class DetailLogger extends jp.ecuacion.lib.core.logging.internal.AbstractLogger
Logs anything you want to log.

Logs output by other libraries or frameworks like spring are processed with this logger, so the root logger is used.

All the loglevels (trace, debug, info, warn, error) can be used.

  • Nested Class Summary

    Nested classes/interfaces inherited from class jp.ecuacion.lib.core.logging.internal.AbstractLogger

    jp.ecuacion.lib.core.logging.internal.AbstractLogger.LogLevel
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new instance with a caller class.
    Constructs a new instance with a caller instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    debug(String message)
    Logs message with "debug" loglevel.
    void
    error(String message)
    Logs message with "error" loglevel.
    void
    Logs exception message with "error" loglevel.
    void
    info(String message)
    Logs message with "info" loglevel.
    void
    trace(String message)
    Logs message with "trace" loglevel.
    void
    warn(String message)
    Logs message with "warn" loglevel.

    Methods inherited from class jp.ecuacion.lib.core.logging.internal.AbstractLogger

    log, logThrowable

    Methods inherited from class java.lang.Object

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

    • DetailLogger

      public DetailLogger(@Nonnull Object object)
      Constructs a new instance with a caller instance.
      Parameters:
      object - caller object
    • DetailLogger

      public DetailLogger(@Nonnull Class<?> cls)
      Constructs a new instance with a caller class. Used when logging is executed from static method.
      Parameters:
      cls - caller class.
  • Method Details

    • trace

      public void trace(@Nonnull String message)
      Logs message with "trace" loglevel.
      Parameters:
      message - message to log
    • debug

      public void debug(@Nonnull String message)
      Logs message with "debug" loglevel.
      Parameters:
      message - message to log
    • info

      public void info(@Nonnull String message)
      Logs message with "info" loglevel.
      Parameters:
      message - message to log
    • warn

      public void warn(@Nonnull String message)
      Logs message with "warn" loglevel.
      Parameters:
      message - message to log
    • error

      public void error(@Nonnull String message)
      Logs message with "error" loglevel.
      Parameters:
      message - message to log
    • error

      public void error(@Nonnull Throwable th)
      Logs exception message with "error" loglevel.
      Parameters:
      th - exception to log