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