Class JKLogger

java.lang.Object
com.jk.core.logging.JKLogger

public class JKLogger extends Object
This class provides logging functionality using the underlying Logger implementation.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Summary

    Constructors
    Constructor
    Description
    This method initiates a new JKLogger with the specified name.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    debug(Object format, Object... msg)
    This method logs a message at the DEBUG level according to the specified format and arguments.
    void
    debug(String msg, Throwable exception)
    This method logs an exception (throwable) at the DEBUG level with an accompanying message.
    void
    error(Object format, Object... msg)
    This method logs a message at the ERROR level according to the specified format and arguments.
    void
    error(String msg, Throwable exception)
    This method logs an exception (throwable) at the ERROR level with an accompanying message.
    void
    error(Throwable throwable)
    This method logs an exception (throwable) at the ERROR level with an accompanying message.
    void
    info(String format, Object... msg)
    This method logs a message at the INFO level according to the specified format and arguments.
    void
    info(String msg, Throwable exception)
    This method logs an exception (throwable) at the INFO level with an accompanying message.
    boolean
    This method checks whether the logger instance enabled for the DEBUG level or not.
    void
    trace(Object format, Object... msg)
    This method logs a message at the TRACE level according to the specified format and arguments.
    void
    trace(String msg, Throwable exception)
    This method logs an exception (throwable) at the TRACE level with an accompanying message.
    void
    warn(String format, Object... msg)
    This method logs a message at the WARN level according to the specified format and arguments.

    Methods inherited from class java.lang.Object

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

    • JKLogger

      public JKLogger(String name)
      This method initiates a new JKLogger with the specified name.
      Parameters:
      name - Specifies the logger name.
  • Method Details

    • info

      public void info(String format, Object... msg)
      This method logs a message at the INFO level according to the specified format and arguments.
      Parameters:
      format - Specifies the format for the informational message.
      msg - Specifies the message arguments.
    • info

      public void info(String msg, Throwable exception)
      This method logs an exception (throwable) at the INFO level with an accompanying message.
      Parameters:
      msg - Specifying the message accompanying the exception.
      exception - Specifies the exception (throwable) to log.
    • debug

      public void debug(Object format, Object... msg)
      This method logs a message at the DEBUG level according to the specified format and arguments.
      Parameters:
      format - Specifies the format for the informational message.
      msg - Specifies the message arguments.
    • debug

      public void debug(String msg, Throwable exception)
      This method logs an exception (throwable) at the DEBUG level with an accompanying message.
      Parameters:
      msg - Specifying the message accompanying the exception.
      exception - Specifies the exception (throwable) to log.
    • trace

      public void trace(Object format, Object... msg)
      This method logs a message at the TRACE level according to the specified format and arguments.
      Parameters:
      format - Specifies the format for the informational message.
      msg - Specifies the message arguments.
    • trace

      public void trace(String msg, Throwable exception)
      This method logs an exception (throwable) at the TRACE level with an accompanying message.
      Parameters:
      msg - Specifying the message accompanying the exception.
      exception - Specifies the exception (throwable) to log.
    • error

      public void error(Object format, Object... msg)
      This method logs a message at the ERROR level according to the specified format and arguments.
      Parameters:
      format - Specifies the format for the informational message.
      msg - Specifies the message arguments.
    • error

      public void error(String msg, Throwable exception)
      This method logs an exception (throwable) at the ERROR level with an accompanying message.
      Parameters:
      msg - Specifying the message accompanying the exception.
      exception - Specifies the exception (throwable) to log.
    • error

      public void error(Throwable throwable)
      This method logs an exception (throwable) at the ERROR level with an accompanying message.
      Parameters:
      throwable - Specifies the exception (throwable) to log.
    • isDebugEnabled

      public boolean isDebugEnabled()
      This method checks whether the logger instance enabled for the DEBUG level or not.
      Returns:
      true, if is debug enabled, false otherwise.
    • warn

      public void warn(String format, Object... msg)
      This method logs a message at the WARN level according to the specified format and arguments.
      Parameters:
      format - Specifies the format for the informational message.
      msg - Specifies the message arguments.