|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jrunx.logger.LogEvent
A LogEvent represents a single log message.
| Field Summary | |
static java.lang.String |
DEFAULT_FORMAT
|
protected static java.lang.String |
lineSeparator
|
static int |
LOG_DEBUG
|
static int |
LOG_ERROR
|
static int |
LOG_INFO
|
static int |
LOG_METRICS
|
static int |
LOG_USER
|
static int |
LOG_WARNING
|
| Constructor Summary | |
LogEvent(int type,
java.lang.String msg)
Construct a new LogEvent |
|
LogEvent(int type,
java.lang.String msg,
java.lang.Throwable t)
Construct a new LogEvent |
|
LogEvent(int type,
java.lang.String msg,
java.lang.Throwable t,
java.util.Properties props)
Construct a new LogEvent |
|
| Method Summary | |
protected java.lang.String |
getExceptionString(java.lang.Throwable t)
|
java.lang.String |
getFormat()
Gets the current format for the event |
java.lang.String |
getFormattedMessage(java.lang.String f)
Gets the formatted message. |
java.util.Date |
getLogTime()
Gets the time that the message was logged |
java.lang.String |
getMessage()
Gets the log message |
java.util.Properties |
getProperties()
Gets the additional properties associated with this message, such as metrics information. |
java.lang.Throwable |
getThrowable()
Gets the exception associated with this message |
int |
getType()
Gets the log event type. |
java.util.Properties |
getVariables(java.lang.String format)
Gets the variables for the current log event. |
boolean |
isDebug()
Determines if this message is a debug message |
boolean |
isError()
Determines if this message is an error message |
boolean |
isInfo()
Determines if this message is an informational message |
boolean |
isMetrics()
Determines if this message is a metrics message |
boolean |
isUser()
Determines if this message is a user message |
boolean |
isWarning()
Determines if this message is an warning message |
void |
setFormat(java.lang.String format)
Sets the current format for the event |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int LOG_ERROR
public static final int LOG_WARNING
public static final int LOG_INFO
public static final int LOG_DEBUG
public static final int LOG_METRICS
public static final int LOG_USER
public static final java.lang.String DEFAULT_FORMAT
protected static java.lang.String lineSeparator
| Constructor Detail |
public LogEvent(int type,
java.lang.String msg)
type - The event typemsg - The message
public LogEvent(int type,
java.lang.String msg,
java.lang.Throwable t)
type - The event typemsg - The messagethrowable - The exception, or null if none
public LogEvent(int type,
java.lang.String msg,
java.lang.Throwable t,
java.util.Properties props)
type - The event typemsg - The messagethrowable - The exception, or null if noneprops - Additional properties for the log event (such as metrics)| Method Detail |
public int getType()
public boolean isError()
public boolean isWarning()
public boolean isInfo()
public boolean isDebug()
public boolean isMetrics()
public boolean isUser()
public java.lang.String getMessage()
public java.lang.String getFormattedMessage(java.lang.String f)
format - The format to apply, or null to use the defaultprotected java.lang.String getExceptionString(java.lang.Throwable t)
public java.util.Properties getVariables(java.lang.String format)
format - The logging format, or null to use the defaultpublic java.lang.Throwable getThrowable()
public java.util.Properties getProperties()
public void setFormat(java.lang.String format)
format - The formatpublic java.lang.String getFormat()
public java.util.Date getLogTime()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||