public abstract class LogEvent extends Object
LogEvent.Factory
to create events from the log streamLogType
to declare the log type and eventually available parameters to customize its formatModifier and Type | Class and Description |
---|---|
static class |
LogEvent.Factory
The base class for LogEvent factories, responsible for parsing an input stream into
LogEvent s. |
Modifier | Constructor and Description |
---|---|
protected |
LogEvent(LogEvent.Factory factory,
String rawLog) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkInitialized() |
String |
dump() |
void |
dump(PrintWriter out) |
String |
getAttribute(int pos)
Get a provided attribute value by its position index.
|
String |
getAttribute(String attributeName)
Extracts an attribute's provided value of the log event.
|
String[] |
getAttributes()
Get a clone copy of the provided attributes.
|
int |
getAttributesCount()
Get provided attributes count.
|
LogEvent.Factory |
getFactory() |
String |
getRawLog()
Get the raw log text from which this event was parsed.
|
String |
getTimestamp()
Get the timestamp.
|
String |
getValue(LogType.AttributeInfo info) |
protected void |
setAttributes(String[] attributes)
Set the provided attributes values.
|
protected LogEvent(LogEvent.Factory factory, String rawLog)
protected void setAttributes(String[] attributes)
attributes
- attributes valuesprotected void checkInitialized()
public String getRawLog()
public String getAttribute(int pos)
pos
- the position index of the attribute.public String[] getAttributes()
public int getAttributesCount()
public String getAttribute(String attributeName)
attributeName
- the name of the attribute (provided only)public String getValue(LogType.AttributeInfo info)
public LogEvent.Factory getFactory()
public void dump(PrintWriter out)
public String getTimestamp()
LogType.Description.getTimestampAttribute()
Copyright © 2004–2014. All rights reserved.