Class LoggerManager

java.lang.Object
edu.university.ecs.lab.common.services.LoggerManager

public class LoggerManager extends Object
Static functions to manage logger object
  • Field Details

    • logger

      private static final org.apache.logging.log4j.Logger logger
  • Constructor Details

    • LoggerManager

      public LoggerManager()
  • Method Details

    • info

      public static void info(Supplier<String> msgSupplier)
      Log an info message
      Parameters:
      msgSupplier - the message to log
    • warn

      public static void warn(Supplier<String> msgSupplier)
      Log a warning message
      Parameters:
      msgSupplier - the message to log
    • debug

      public static void debug(Supplier<String> msgSupplier)
      Log a debug message
      Parameters:
      msgSupplier - the message to log
    • error

      public static void error(Supplier<String> msgSupplier, Optional<Exception> exception)
      Log an error message
      Parameters:
      msgSupplier - the message to log
    • log

      private static void log(org.apache.logging.log4j.Level level, Supplier<String> msgSupplier)
      Log message
      Parameters:
      level - the logging level
      msgSupplier - the message to log