Class FileLog

java.lang.Object
com.qaitsolutions.pframe.core.logging.FileLog

public final class FileLog extends Object
Wrapper class for log4j logging Logger.

Since:
1.0
Author:
Iulian Andrei (iulian.andrei@qaitsolutions.com)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    debug(@NonNull String message)
    Logs a message at debug level.
    static void
    error(@NonNull String message)
    Logs a message at error level.
    static void
    error(@NonNull String message, @NonNull Throwable cause)
    Logs message at Error level with full stack trace.
    static void
    info(@NonNull String message)
    Logs a message at info level.
    static void
    warn(@NonNull String message)
    Logs a message at warn level.
    static void
    warn(@NonNull String message, @NonNull Throwable cause)
    Logs a message at warn level with full stack trace.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FileLog

      public FileLog()
  • Method Details

    • debug

      public static void debug(@NonNull @NonNull String message)
      Logs a message at debug level. Wrapper over Logger.log(Level, String).

      Parameters:
      message - Text that will appear in the log.
    • info

      public static void info(@NonNull @NonNull String message)
      Logs a message at info level. Wrapper over Logger.log(Level, String).

      Parameters:
      message - Text that will appear in the log.
    • warn

      public static void warn(@NonNull @NonNull String message)
      Logs a message at warn level. Wrapper over Logger.log(Level, String).

      Parameters:
      message - Text that will appear in the log.
    • warn

      public static void warn(@NonNull @NonNull String message, @NonNull @NonNull Throwable cause)
      Logs a message at warn level with full stack trace. Wrapper over Logger.log(Level, String).

      Parameters:
      message - Text that will appear in the log
      cause - Throwable that will be used to log the stack trace
    • error

      public static void error(@NonNull @NonNull String message)
      Logs a message at error level. Wrapper over Logger.log(Level, String).

      Parameters:
      message - Text that will appear in the log
    • error

      public static void error(@NonNull @NonNull String message, @NonNull @NonNull Throwable cause)
      Logs message at Error level with full stack trace. Wrapper over Logger.log(Level, String).

      Parameters:
      message - Text that will appear in the log.
      cause - Throwable will be used to get the full stack trace and log it.