Package ushiosan.jvm

Class ULogger

java.lang.Object
ushiosan.jvm.ULogger

public final class ULogger extends Object
  • Method Details

    • getLogger

      @NotNull public static @NotNull Logger getLogger(@NotNull @NotNull Class<?> cls)
      Creates a new logger instance using the assigned class.
      Parameters:
      cls - the class that will register the logger
      Returns:
      the logger instance
      Throws:
      IllegalArgumentException - error if cls is null
    • logInfo

      public static void logInfo(@NotNull @NotNull Logger logger, @NotNull @NotNull String format, Object @Nullable ... args)
      It generates an info-type record, and it is only necessary to pass the format, and it will automatically take care of generating the record.
      Parameters:
      logger - the logger instance
      format - message format
      args - format arguments
      Throws:
      IllegalArgumentException - error if logger or format are null
    • logInfo

      public static void logInfo(@NotNull @NotNull Logger logger, @NotNull @NotNull Throwable error)
      It generates an info-type record, and it is only necessary to pass the error, and it will automatically take care of generating the record.
      Parameters:
      logger - the logger instance
      error - the error used to generate the record
      Throws:
      IllegalArgumentException - error if logger or error are null
    • logWarning

      public static void logWarning(@NotNull @NotNull Logger logger, @NotNull @NotNull String format, Object @Nullable ... args)
      It generates a warning-type record, and it is only necessary to pass the format, and it will automatically take care of generating the record.
      Parameters:
      logger - the logger instance
      format - message format
      args - format arguments
      Throws:
      IllegalArgumentException - error if logger or format are null
    • logWarning

      public static void logWarning(@NotNull @NotNull Logger logger, @NotNull @NotNull Throwable error)
      It generates a warning-type record, and it is only necessary to pass the error, and it will automatically take care of generating the record.
      Parameters:
      logger - the logger instance
      error - the error used to generate the record
      Throws:
      IllegalArgumentException - error if logger or error are null
    • logError

      public static void logError(@NotNull @NotNull Logger logger, @NotNull @NotNull String format, Object @Nullable ... args)
      It generates an error-type record, and it is only necessary to pass the format, and it will automatically take care of generating the record.
      Parameters:
      logger - the logger instance
      format - message format
      args - format arguments
      Throws:
      IllegalArgumentException - error if logger or format are null
    • logError

      public static void logError(@NotNull @NotNull Logger logger, @NotNull @NotNull Throwable error)
      It generates an error-type record, and it is only necessary to pass the error, and it will automatically take care of generating the record.
      Parameters:
      logger - the logger instance
      error - the error used to generate the record
      Throws:
      IllegalArgumentException - error if logger or error are null