Package com.jk.core.logging
Class JKLog
java.lang.Object
com.jk.core.logging.JKLog
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method gets the forward IP address.This method gets the host IP address.This method gets the log message.getName()
This method gets the log name.This method gets the real IP address.This method gets the remote machine IP address.This method gets the log severity.This method gets the log time stamp.This method gets the user name.void
setForwardIp
(String forwardIp) This method sets the forward IP address to the specified value.void
This method sets the host IP address to the specified value.void
setMessage
(String message) This method sets the log message to the provided value.void
This sets the log name to the provided value.void
This method sets the real IP address to the specified value.void
setRemoteIp
(String remoteIp) This method sets the remote machine IP address to the specified value.void
setSeverity
(String severity) This method sets the log severity to the provided value.void
setTimeStamp
(Date timeStamp) This method sets the log time stamp to the provided value.void
setUserName
(String userName) This method sets the user name to the provided value.This method returns the log message containing all its attributes, formatted in a readable form.
-
Field Details
-
TRACE
Represents the TRACE log level.- See Also:
-
DEBUG
Represents the DEBUG log level.- See Also:
-
INFO
Represents the INFO log level.- See Also:
-
WARN
Represents the WARN log level.- See Also:
-
ERROR
Represents the ERROR log level.- See Also:
-
-
Constructor Details
-
JKLog
public JKLog()This method constructs a newJKLog
. -
JKLog
This method constructs a newJKLog
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
This method gets the log name.- Returns:
- the log name.
-
getMessage
This method gets the log message.- Returns:
- the log message.
-
getSeverity
This method gets the log severity.- Returns:
- the log severity.
-
setSeverity
This method sets the log severity to the provided value.- Parameters:
severity
- Specifies the new log severity.
-
setName
This sets the log name to the provided value.- Parameters:
name
- Specifies the new log name.
-
setMessage
This method sets the log message to the provided value.- Parameters:
message
- Specifies the new log message.
-
getTimeStamp
This method gets the log time stamp.- Returns:
- the log time stamp.
-
setTimeStamp
This method sets the log time stamp to the provided value.- Parameters:
timeStamp
- Specifies the new log time stamp.
-
getUserName
This method gets the user name.- Returns:
- the user name.
-
setUserName
This method sets the user name to the provided value.- Parameters:
userName
- Specifies the new user name.
-
getHostIp
This method gets the host IP address.- Returns:
- the host IP address.
-
setHostIp
This method sets the host IP address to the specified value.- Parameters:
hostIp
- Specifies the new host IP address.
-
getRemoteIp
This method gets the remote machine IP address.- Returns:
- the remote machine IP address.
-
setRemoteIp
This method sets the remote machine IP address to the specified value.- Parameters:
remoteIp
- Specifies the new remote machine IP address.
-
getRealIp
This method gets the real IP address.- Returns:
- the real IP address.
-
setRealIp
This method sets the real IP address to the specified value.- Parameters:
realIp
- Specifies the new real IP address.
-
getForwardIp
This method gets the forward IP address.- Returns:
- the forward IP address.
-
setForwardIp
This method sets the forward IP address to the specified value.- Parameters:
forwardIp
- Specifies the new forward IP address.
-
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.
-