|
|||||||||
| 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.EventsetBody in class org.apache.flume.event.SimpleEventbody - The body to add to the event.public String getLoggerFqcn()
getLoggerFqcn in interface LogEventpublic Level getLevel()
getLevel in interface LogEventpublic String getLoggerName()
getLoggerName in interface LogEventpublic StackTraceElement getSource()
getSource in interface LogEventpublic Message getMessage()
getMessage in interface LogEventpublic Marker getMarker()
getMarker in interface LogEventpublic String getThreadName()
getThreadName in interface LogEventpublic long getTimeMillis()
getTimeMillis in interface LogEventpublic Throwable getThrown()
getThrown in interface LogEventpublic ThrowableProxy getThrownProxy()
getThrownProxy in interface LogEventpublic Map<String,String> getContextMap()
getContextMap in interface LogEventpublic ThreadContext.ContextStack getContextStack()
getContextStack in interface LogEventpublic boolean isIncludeLocation()
isIncludeLocation in interface LogEventpublic void setIncludeLocation(boolean includeLocation)
setIncludeLocation in interface LogEventpublic boolean isEndOfBatch()
isEndOfBatch in interface LogEventpublic 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-2014 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.