public static final class LogCapture.Message
extends java.lang.Object
| Constructor and Description |
|---|
Message(java.util.Date timestamp,
java.lang.String loggerName,
LDLogLevel level,
java.lang.String text)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
LDLogLevel |
getLevel()
Returns the log level of the message.
|
java.lang.String |
getLoggerName()
Returns the name of the logger that produced the message.
|
java.lang.String |
getText()
Returns the text of the message.
|
java.util.Date |
getTimestamp()
Returns the time the message was generated.
|
int |
hashCode() |
java.lang.String |
toString()
Returns a basic string representation of the log item, in the format
"[logger name] LEVEL: text".
|
java.lang.String |
toStringWithTimestamp()
Equivalent to
toString(), but also prefixes the line with a millisecond timestamp. |
public Message(java.util.Date timestamp,
java.lang.String loggerName,
LDLogLevel level,
java.lang.String text)
timestamp - the time the message was generatedloggerName - the logger namelevel - the log leveltext - the text of the message, after any parameters have been substitutedpublic java.util.Date getTimestamp()
This is represented as a Date rather than a java.time.Instant
because currently this code needs to support Android API versions that do not have java.time.
public java.lang.String getLoggerName()
public LDLogLevel getLevel()
public java.lang.String getText()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjecttoStringWithTimestamp()public java.lang.String toStringWithTimestamp()
toString(), but also prefixes the line with a millisecond timestamp.