Class SummaryLogger

java.lang.Object
jp.ecuacion.lib.core.logging.SummaryLogger

public class SummaryLogger extends Object
Logs start and end time of the timer-triggered exections, espacially used in batch programs. Not used for web or rest.

This is mainly expected to use in the ecuacion-lib or other library, but not in specific apps.
Although you can use it in the case that you need to skip the execution in some condition or things like this.

You are also allowed to log what is as important as the start and end status, but in most cases it's better to log with DetailLogger.

Available loglevels are as follows:

  • info : uses for start and normal end
  • warn : uses for skip and any other special way of enging executions
  • error: uses for abnormal end
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.slf4j.Logger
    internalLogger.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new instance with a fixed logger name.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    error(String message)
    Logs message with "error" loglevel.
    void
    info(String message)
    Logs message with "info" loglevel.
    void
    log(org.slf4j.event.Level logLevel, String message)
    Logs message with logLevel.
    void
    warn(String message)
    Logs message with "warn" loglevel.

    Methods inherited from class Object

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

    • internalLogger

      protected org.slf4j.Logger internalLogger
      internalLogger.
  • Constructor Details

    • SummaryLogger

      public SummaryLogger()
      Constructs a new instance with a fixed logger name.
  • Method Details

    • info

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

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

      public void error(@RequireNonnull String message)
      Logs message with "error" loglevel.
      Parameters:
      message - message to log. Cannot be null.
    • log

      public void log(org.slf4j.event.Level logLevel, String message)
      Logs message with logLevel.
      Parameters:
      logLevel - logLevel. Cannot be null.
      message - message. Cannot be null.