Constructor and Description |
---|
LogMessage(String message,
org.apache.log4j.Level logLevel,
Log receiver,
boolean receiverWouldLog,
String thread)
Creates a new log message based on the given parameters.
|
Modifier and Type | Method and Description |
---|---|
org.apache.log4j.Level |
getLogLevel()
Contains the log level used for this message.
|
String |
getMessage()
Contains the logged message.
|
Log |
getReceiver()
Returns the logger used to handle this message.
|
String |
getThread()
Returns the name of the thread which logged the message.
|
long |
getTimestamp()
Returns the timestamp when this message was created.
|
String |
getTimestampAsString()
Returns the timestamp when this message was created as string.
|
boolean |
isReceiverWouldLog()
Returns whether the receiver has logged this message.
|
public LogMessage(String message, org.apache.log4j.Level logLevel, Log receiver, boolean receiverWouldLog, String thread)
message
- the message to loglogLevel
- the level of the messagereceiver
- the original receiverreceiverWouldLog
- determines if the receiver would have logged the messagethread
- the thread in which the message was loggedpublic String getMessage()
public org.apache.log4j.Level getLogLevel()
public Log getReceiver()
public boolean isReceiverWouldLog()
public String getTimestampAsString()
public long getTimestamp()
public String getThread()
Copyright © 2018. All rights reserved.