Class JKLog

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

public class JKLog extends Object
This model represents log levels commonly used for logging purposes. It is designed to provide simplicity for microservices integration. For more detailed usage and implementation, refer to the crosscutting/logging service.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Field Details

  • Constructor Details

    • JKLog

      public JKLog()
      This method constructs a new JKLog.
    • JKLog

      public JKLog(String name, String message, String severity)
      This method constructs a new JKLog with the specified name, message and severity.
      Parameters:
      name - Specifies the log name.
      message - Specifies the log message.
      severity - Specifies the log severity.
  • Method Details

    • getName

      public String getName()
      This method gets the log name.
      Returns:
      the log name.
    • getMessage

      public String getMessage()
      This method gets the log message.
      Returns:
      the log message.
    • getSeverity

      public String getSeverity()
      This method gets the log severity.
      Returns:
      the log severity.
    • setSeverity

      public void setSeverity(String severity)
      This method sets the log severity to the provided value.
      Parameters:
      severity - Specifies the new log severity.
    • setName

      public void setName(String name)
      This sets the log name to the provided value.
      Parameters:
      name - Specifies the new log name.
    • setMessage

      public void setMessage(String message)
      This method sets the log message to the provided value.
      Parameters:
      message - Specifies the new log message.
    • getTimeStamp

      public Date getTimeStamp()
      This method gets the log time stamp.
      Returns:
      the log time stamp.
    • setTimeStamp

      public void setTimeStamp(Date timeStamp)
      This method sets the log time stamp to the provided value.
      Parameters:
      timeStamp - Specifies the new log time stamp.
    • getUserName

      public String getUserName()
      This method gets the user name.
      Returns:
      the user name.
    • setUserName

      public void setUserName(String userName)
      This method sets the user name to the provided value.
      Parameters:
      userName - Specifies the new user name.
    • getHostIp

      public String getHostIp()
      This method gets the host IP address.
      Returns:
      the host IP address.
    • setHostIp

      public void setHostIp(String hostIp)
      This method sets the host IP address to the specified value.
      Parameters:
      hostIp - Specifies the new host IP address.
    • getRemoteIp

      public String getRemoteIp()
      This method gets the remote machine IP address.
      Returns:
      the remote machine IP address.
    • setRemoteIp

      public void setRemoteIp(String remoteIp)
      This method sets the remote machine IP address to the specified value.
      Parameters:
      remoteIp - Specifies the new remote machine IP address.
    • getRealIp

      public String getRealIp()
      This method gets the real IP address.
      Returns:
      the real IP address.
    • setRealIp

      public void setRealIp(String realIp)
      This method sets the real IP address to the specified value.
      Parameters:
      realIp - Specifies the new real IP address.
    • getForwardIp

      public String getForwardIp()
      This method gets the forward IP address.
      Returns:
      the forward IP address.
    • setForwardIp

      public void setForwardIp(String forwardIp)
      This method sets the forward IP address to the specified value.
      Parameters:
      forwardIp - Specifies the new forward IP address.
    • toLogMessage

      public String toLogMessage()
      This method returns the log message containing all its attributes, formatted in a readable form.
      Returns:
      a string representing the log message containing all its attributes, formatted in a readable form.