|
|||||||||
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 |
addMapData(String prefix,
Map<String,String> fields,
MapMessage msg)
|
protected void |
addStructuredData(String prefix,
Map<String,String> fields,
StructuredDataMessage msg)
|
Map<String,String> |
getContextMap()
Returns a copy of the context Map. |
ThreadContext.ContextStack |
getContextStack()
Returns a copy of the context stack. |
Level |
getLevel()
Returns the logging Level. |
String |
getLoggerFqcn()
Get the Frequently Qualified Class Name. |
String |
getLoggerName()
Returns the logger name. |
Marker |
getMarker()
Returns the Marker. |
Message |
getMessage()
Returns the Message. |
StackTraceElement |
getSource()
Returns the StackTraceElement for the caller of the logging API. |
String |
getThreadName()
Returns the name of the Thread. |
Throwable |
getThrown()
Returns the Throwable associated with the event, if any. |
ThrowableProxy |
getThrownProxy()
Returns the Throwable associated with the event, if any. |
long |
getTimeMillis()
Returns the event timestamp. |
boolean |
isEndOfBatch()
|
boolean |
isIncludeLocation()
|
void |
setBody(byte[] body)
Set the body in the event. |
void |
setEndOfBatch(boolean endOfBatch)
|
void |
setIncludeLocation(boolean includeLocation)
|
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)
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 getLoggerFqcn()
getLoggerFqcn
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 getTimeMillis()
getTimeMillis
in interface LogEvent
public Throwable getThrown()
getThrown
in interface LogEvent
public ThrowableProxy getThrownProxy()
getThrownProxy
in interface LogEvent
public Map<String,String> getContextMap()
getContextMap
in interface LogEvent
public ThreadContext.ContextStack getContextStack()
getContextStack
in interface LogEvent
public boolean isIncludeLocation()
isIncludeLocation
in interface LogEvent
public void setIncludeLocation(boolean includeLocation)
setIncludeLocation
in interface LogEvent
public boolean isEndOfBatch()
isEndOfBatch
in interface LogEvent
public void setEndOfBatch(boolean endOfBatch)
setEndOfBatch
in interface LogEvent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.