@EventDriven @SideEffectFree @SupportsBatching(defaultDuration=TWENTY_FIVE_MILLIS) @Tags(value={"attributes","logging"}) @InputRequirement(value=INPUT_REQUIRED) @CapabilityDescription(value="Emits attributes of the FlowFile at the specified log level") public class LogAttribute extends AbstractProcessor
| Modifier and Type | Class and Description |
|---|---|
static class |
LogAttribute.DebugLevels |
protected static class |
LogAttribute.FlowFilePayloadCallback |
| Modifier and Type | Field and Description |
|---|---|
static PropertyDescriptor |
ATTRIBUTES_TO_IGNORE_CSV |
static PropertyDescriptor |
ATTRIBUTES_TO_IGNORE_REGEX |
static PropertyDescriptor |
ATTRIBUTES_TO_LOG_CSV |
static PropertyDescriptor |
ATTRIBUTES_TO_LOG_REGEX |
static PropertyDescriptor |
CHARSET |
static String |
FIFTY_DASHES |
(package private) static PropertyDescriptor |
LOG_FLOWFILE_PROPERTIES |
static PropertyDescriptor |
LOG_LEVEL |
static PropertyDescriptor |
LOG_PAYLOAD |
static PropertyDescriptor |
LOG_PREFIX |
static long |
ONE_MB |
static PropertyDescriptor |
OUTPUT_FORMAT |
private static AllowableValue |
OUTPUT_FORMAT_LINE_PER_ATTRIBUTE |
private static AllowableValue |
OUTPUT_FORMAT_SINGLE_LINE |
static Relationship |
REL_SUCCESS |
private Set<Relationship> |
relationships |
private List<PropertyDescriptor> |
supportedDescriptors |
| Constructor and Description |
|---|
LogAttribute() |
| Modifier and Type | Method and Description |
|---|---|
private Set<String> |
getAttributesToLog(Set<String> flowFileAttrKeys,
ProcessContext context) |
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ProcessorInitializationContext context) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
protected String |
processFlowFile(ComponentLog logger,
LogAttribute.DebugLevels logLevel,
FlowFile flowFile,
ProcessSession session,
ProcessContext context) |
private void |
transferChunk(ProcessSession session) |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTruecustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprivate static final AllowableValue OUTPUT_FORMAT_LINE_PER_ATTRIBUTE
private static final AllowableValue OUTPUT_FORMAT_SINGLE_LINE
public static final PropertyDescriptor LOG_LEVEL
public static final PropertyDescriptor ATTRIBUTES_TO_LOG_CSV
public static final PropertyDescriptor ATTRIBUTES_TO_LOG_REGEX
public static final PropertyDescriptor ATTRIBUTES_TO_IGNORE_CSV
public static final PropertyDescriptor ATTRIBUTES_TO_IGNORE_REGEX
public static final PropertyDescriptor OUTPUT_FORMAT
public static final PropertyDescriptor LOG_PAYLOAD
static final PropertyDescriptor LOG_FLOWFILE_PROPERTIES
public static final PropertyDescriptor LOG_PREFIX
public static final PropertyDescriptor CHARSET
public static final String FIFTY_DASHES
public static final long ONE_MB
private Set<Relationship> relationships
private List<PropertyDescriptor> supportedDescriptors
public static final Relationship REL_SUCCESS
protected void init(ProcessorInitializationContext context)
init in class AbstractSessionFactoryProcessorpublic Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorprotected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprotected String processFlowFile(ComponentLog logger, LogAttribute.DebugLevels logLevel, FlowFile flowFile, ProcessSession session, ProcessContext context)
private Set<String> getAttributesToLog(Set<String> flowFileAttrKeys, ProcessContext context)
private void transferChunk(ProcessSession session)
public void onTrigger(ProcessContext context, ProcessSession session)
onTrigger in class AbstractProcessorCopyright © 2023 Apache NiFi Project. All rights reserved.