Class Log

java.lang.Object
io.github.the_sdet.logger.Log

public class Log extends Object
Utility class for logging messages using Log4j. This class provides methods for logging messages at different levels: INFO, ERROR, DEBUG, and WARN.

The logger is initialized statically, ensuring that it's configured and ready for use. The static block configures the logger, setting its log level to DEBUG, and then initializes it. This ensures that the logger is properly configured before any logging operations are performed.

Author:
Pabitra Swain ([email protected])
  • Constructor Details

    • Log

      public Log()
  • Method Details

    • info

      public static void info(String message)
      Log an informational message.
      Parameters:
      message - The message to log.
    • error

      public static void error(String message)
      Log an error message.
      Parameters:
      message - The message to log.
    • error

      public static void error(String message, Exception e)
      Log an error message with an associated exception.
      Parameters:
      message - The message to log.
      e - The exception to include in the log.
    • debug

      public static void debug(String message)
      Log a debug message.
      Parameters:
      message - The message to log.
    • warn

      public static void warn(String message)
      Log a warning message.
      Parameters:
      message - The message to log.