public class FlumeEvent extends org.apache.flume.event.SimpleEvent implements org.apache.logging.log4j.core.LogEvent
| Constructor and Description |
|---|
FlumeEvent(org.apache.logging.log4j.core.LogEvent event,
String includes,
String excludes,
String required,
String mdcPrefix,
String eventPrefix,
boolean compress)
Construct the FlumeEvent.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addContextData(String prefix,
Map<String,String> fields,
Map<String,String> context) |
protected void |
addMapData(String prefix,
Map<String,String> fields,
org.apache.logging.log4j.message.MapMessage msg) |
protected void |
addStructuredData(String prefix,
Map<String,String> fields,
org.apache.logging.log4j.message.StructuredDataMessage msg) |
Map<String,String> |
getContextMap()
Returns a copy of the context Map.
|
org.apache.logging.log4j.ThreadContext.ContextStack |
getContextStack()
Returns a copy of the context stack.
|
org.apache.logging.log4j.Level |
getLevel()
Returns the logging Level.
|
String |
getLoggerFqcn()
Get the Frequently Qualified Class Name.
|
String |
getLoggerName()
Returns the logger name.
|
org.apache.logging.log4j.Marker |
getMarker()
Returns the Marker.
|
org.apache.logging.log4j.message.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.
|
org.apache.logging.log4j.core.impl.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) |
public FlumeEvent(org.apache.logging.log4j.core.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.protected void addStructuredData(String prefix, Map<String,String> fields, org.apache.logging.log4j.message.StructuredDataMessage msg)
protected void addMapData(String prefix, Map<String,String> fields, org.apache.logging.log4j.message.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 org.apache.logging.log4j.core.LogEventpublic org.apache.logging.log4j.Level getLevel()
getLevel in interface org.apache.logging.log4j.core.LogEventpublic String getLoggerName()
getLoggerName in interface org.apache.logging.log4j.core.LogEventpublic StackTraceElement getSource()
getSource in interface org.apache.logging.log4j.core.LogEventpublic org.apache.logging.log4j.message.Message getMessage()
getMessage in interface org.apache.logging.log4j.core.LogEventpublic org.apache.logging.log4j.Marker getMarker()
getMarker in interface org.apache.logging.log4j.core.LogEventpublic String getThreadName()
getThreadName in interface org.apache.logging.log4j.core.LogEventpublic long getTimeMillis()
getTimeMillis in interface org.apache.logging.log4j.core.LogEventpublic Throwable getThrown()
getThrown in interface org.apache.logging.log4j.core.LogEventpublic org.apache.logging.log4j.core.impl.ThrowableProxy getThrownProxy()
getThrownProxy in interface org.apache.logging.log4j.core.LogEventpublic Map<String,String> getContextMap()
getContextMap in interface org.apache.logging.log4j.core.LogEventpublic org.apache.logging.log4j.ThreadContext.ContextStack getContextStack()
getContextStack in interface org.apache.logging.log4j.core.LogEventpublic boolean isIncludeLocation()
isIncludeLocation in interface org.apache.logging.log4j.core.LogEventpublic void setIncludeLocation(boolean includeLocation)
setIncludeLocation in interface org.apache.logging.log4j.core.LogEventpublic boolean isEndOfBatch()
isEndOfBatch in interface org.apache.logging.log4j.core.LogEventpublic void setEndOfBatch(boolean endOfBatch)
setEndOfBatch in interface org.apache.logging.log4j.core.LogEventCopyright © 1999-2021 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.