|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.flume.event.SimpleEvent
org.apache.logging.log4j.flume.appender.FlumeEvent
public class FlumeEvent
Class that is both a Flume and Log4j Event.
Constructor Summary | |
---|---|
FlumeEvent(LogEvent event,
String includes,
String excludes,
String required,
String mdcPrefix,
String eventPrefix,
boolean compress)
Construct the FlumeEvent. |
Method Summary | |
---|---|
protected void |
addContextData(String prefix,
Map<String,String> fields,
Map<String,String> context)
|
protected void |
addGuid(Map<String,String> fields)
|
protected void |
addMapData(String prefix,
Map<String,String> fields,
MapMessage msg)
|
protected void |
addStructuredData(String prefix,
Map<String,String> fields,
StructuredDataMessage msg)
|
Map<String,String> |
getContextMap()
Return a copy of the context Map. |
Stack<String> |
getContextStack()
Return a copy of the context stack. |
String |
getFQCN()
Get the Frequently Qualified Class Name. |
Level |
getLevel()
Return the logging Level. |
String |
getLoggerName()
Return the logger name. |
Marker |
getMarker()
Return the Marker. |
Message |
getMessage()
Return the Message. |
long |
getMillis()
Return the event timestamp. |
StackTraceElement |
getSource()
Return the StackTraceElement for the caller of the logging API. |
String |
getThreadName()
Return the name of the Thread. |
Throwable |
getThrown()
Return the Throwable associated with the event, if any. |
void |
setBody(byte[] body)
Set the body in the event. |
Methods inherited from class org.apache.flume.event.SimpleEvent |
---|
getBody, getHeaders, setHeaders, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FlumeEvent(LogEvent event, String includes, String excludes, String required, String mdcPrefix, String eventPrefix, boolean compress)
event
- The Log4j LogEvent.includes
- A comma separated list of MDC elements to include.excludes
- A comma separated list of MDC elements to exclude.required
- A comma separated list of MDC elements that are required to be defined.mdcPrefix
- The value to prefix to MDC keys.eventPrefix
- The value to prefix to event keys.compress
- If true the event body should be compressed.Method Detail |
---|
protected void addStructuredData(String prefix, Map<String,String> fields, StructuredDataMessage msg)
protected void addMapData(String prefix, Map<String,String> fields, MapMessage msg)
protected void addContextData(String prefix, Map<String,String> fields, Map<String,String> context)
protected void addGuid(Map<String,String> fields)
public void setBody(byte[] body)
setBody
in interface org.apache.flume.Event
setBody
in class org.apache.flume.event.SimpleEvent
body
- The body to add to the event.public String getFQCN()
getFQCN
in interface LogEvent
public Level getLevel()
getLevel
in interface LogEvent
public String getLoggerName()
getLoggerName
in interface LogEvent
public StackTraceElement getSource()
getSource
in interface LogEvent
public Message getMessage()
getMessage
in interface LogEvent
public Marker getMarker()
getMarker
in interface LogEvent
public String getThreadName()
getThreadName
in interface LogEvent
public long getMillis()
getMillis
in interface LogEvent
public Throwable getThrown()
getThrown
in interface LogEvent
public Map<String,String> getContextMap()
getContextMap
in interface LogEvent
public Stack<String> getContextStack()
getContextStack
in interface LogEvent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |