public class LogRecord
extends java.lang.Object
LogRecord encapsulate an entry in a log.| Constructor and Description |
|---|
LogRecord(Level level,
java.lang.String message)
Creates a new
LogRecord with the given level and
message. |
| Modifier and Type | Method and Description |
|---|---|
Level |
getLevel()
Returns the level that the message should be logged at
|
java.lang.String |
getLoggerName()
Returns the name of the logger to which this log record belongs
|
java.lang.String |
getMessage()
Returns the message for this log entry
|
long |
getMillis()
Returns the event time in milliseconds since 1970
|
java.lang.Object[] |
getParameters()
Returns the parameters to this log entry
|
long |
getSequenceNumber()
Returns the sequence number of this log entry
|
java.lang.String |
getSourceClassName()
Returns the name of the source class from which this log entry
was issued
|
java.lang.String |
getSourceMethodName()
Returns the name of the source method from which this log entry
was issued
|
java.lang.Throwable |
getThrown()
Returns the throwable associated with this log entry
|
void |
setLevel(Level level)
Sets the level at which the message id logged
|
void |
setLoggerName(java.lang.String loggerName)
Sets the name of the logger to which this log record belongs
|
void |
setMessage(java.lang.String message)
Sets the message for this log entry
|
void |
setMillis(long millis)
Sets the event time
|
void |
setParameters(java.lang.Object[] parameters)
Sets the parameters to this log entry
|
void |
setSequenceNumber(long sequenceNumber)
Sets the sequence number of this log entry
|
void |
setSourceClassName(java.lang.String sourceClassName)
Sets the name of the source class from which this log entry was
issued
|
void |
setSourceMethodName(java.lang.String sourceMethodName)
Sets the name of the source method from which this log entry was
issued
|
void |
setThrown(java.lang.Throwable thrown)
Sets the throwable associated with this log entry
|
java.lang.String |
toString()
Returns a brief textual description of this
LogRecord |
public LogRecord(Level level, java.lang.String message)
LogRecord with the given level and
message.public void setLevel(Level level)
public Level getLevel()
public void setLoggerName(java.lang.String loggerName)
public java.lang.String getLoggerName()
public void setMessage(java.lang.String message)
public java.lang.String getMessage()
public void setMillis(long millis)
public long getMillis()
public void setParameters(java.lang.Object[] parameters)
public java.lang.Object[] getParameters()
public void setSequenceNumber(long sequenceNumber)
public long getSequenceNumber()
public void setSourceClassName(java.lang.String sourceClassName)
public java.lang.String getSourceClassName()
public void setSourceMethodName(java.lang.String sourceMethodName)
public java.lang.String getSourceMethodName()
public void setThrown(java.lang.Throwable thrown)
public java.lang.Throwable getThrown()
public java.lang.String toString()
LogRecordtoString in class java.lang.ObjectCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.