Class LoggerUtils

java.lang.Object
io.skodjob.testframe.utils.LoggerUtils

public final class LoggerUtils extends Object
Utility methods for logging.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Pattern for logging resource information without namespace.
    static final String
    Pattern for logging resource information with namespace.
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends io.fabric8.kubernetes.api.model.HasMetadata>
    void
    logResource(String operation, org.slf4j.event.Level logLevel, T resource)
    Log resource with correct format
    static <T extends io.fabric8.kubernetes.api.model.HasMetadata>
    void
    logResource(String operation, T resource)
    Log resource with correct format
    static void
    Logs a separator line using the default separator character and length.
    static void
    logSeparator(String delimiterChar, int length)
    Logs a separator line with a custom delimiter character and length.

    Methods inherited from class java.lang.Object

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

    • RESOURCE_LOGGER_PATTERN

      public static final String RESOURCE_LOGGER_PATTERN
      Pattern for logging resource information without namespace.
      See Also:
    • RESOURCE_WITH_NAMESPACE_LOGGER_PATTERN

      public static final String RESOURCE_WITH_NAMESPACE_LOGGER_PATTERN
      Pattern for logging resource information with namespace.
      See Also:
  • Method Details

    • logSeparator

      public static void logSeparator()
      Logs a separator line using the default separator character and length.
    • logSeparator

      public static void logSeparator(String delimiterChar, int length)
      Logs a separator line with a custom delimiter character and length.
      Parameters:
      delimiterChar - The delimiter character.
      length - The length of the separator line.
    • logResource

      public static <T extends io.fabric8.kubernetes.api.model.HasMetadata> void logResource(String operation, T resource)
      Log resource with correct format
      Type Parameters:
      T - The type of the resources.
      Parameters:
      operation - operation with resource
      resource - resource
    • logResource

      public static <T extends io.fabric8.kubernetes.api.model.HasMetadata> void logResource(String operation, org.slf4j.event.Level logLevel, T resource)
      Log resource with correct format
      Type Parameters:
      T - The type of the resources.
      Parameters:
      operation - operation with resource
      logLevel - log level
      resource - resource