Class LogUtil

java.lang.Object
jp.ecuacion.lib.core.util.LogUtil

public class LogUtil extends Object
Provides logging-related utility methods, espacially log Throable.
  • Field Details

    • PARTITION_LARGE

      public static final String PARTITION_LARGE
      is a large partition or separator which separates log lines.
      See Also:
    • PARTITION_MEDIUM

      public static final String PARTITION_MEDIUM
      is a medium partition or separator which separates log lines.
      See Also:
  • Constructor Details

    • LogUtil

      public LogUtil(@Nonnull Object instance)
      Constructs a new instance with an instance.
      Parameters:
      instance - instance which want to log.
    • LogUtil

      public LogUtil(@Nonnull Class<?> cls)
      Constructs a new instance with an instance.
      Parameters:
      cls - class which want to log.
  • Method Details

    • logError

      public void logError(@RequireNonnull Throwable throwable)
      Logs throwable.
      Parameters:
      throwable - throwable
    • logError

      public void logError(@RequireNonnull Throwable throwable, @Nullable Locale locale)
      Logs throwable.
      Parameters:
      throwable - throwable
      locale - locale, may be null which is treated as Locale.getDefault().
    • logError

      public void logError(@RequireNonnull Throwable throwable, @Nullable String additionalMessage)
      Logs throwable.
      Parameters:
      throwable - throwable
      additionalMessage - additionalMessage, may be null if no additionalMessage is needed. In the case o null no additional message is output.
    • logError

      public void logError(@RequireNonnull Throwable throwable, @Nullable String additionalMessage, @Nullable Locale locale)
      Logs throwable.
      Parameters:
      throwable - throwable
      additionalMessage - additionalMessage, may be null if no additionalMessage is needed. In the case o null no additional message is output.
      locale - locale, may be null which is treated as Locale.getDefault().