GitHub user joemeszaros opened a pull request:

    https://github.com/apache/nifi/pull/90

    NIFI-985: Custom log prefix for LogAttribute processor

    When you have a data flow with a bunch of LogAttribute processors it is 
really hard to identify the right LogAttribute processor in the log file and 
distinguish the output of different LogAttribute processors.
    
    There is a new property, called log prefix, which helps the user to set a 
custom log prefix for each Log Attribute processor, which will appear in the 
log output of the processor. Log prefix appears in the first and the last log 
line, followed by the original 50 dashes. If you configure log prefix 'STEP 1: 
' the log output looks like this:
    ```
    STEP 1 :  --------------------------------------------------
    Standard FlowFile Attributes
    Key: 'entryDate'
            Value: 'Tue Sep 22 15:13:02 CEST 2015'
    Key: 'lineageStartDate'
            Value: 'Tue Sep 22 15:13:02 CEST 2015'
    Key: 'fileSize'
            Value: '9'
    FlowFile Attribute Map Content
    Key: 'customAttribute'
            Value: 'custom value'
    STEP 1 :  --------------------------------------------------
    
    flow file content...
    ```
    The following screen shot shows the configuration and the output of the 
processor:
    
    
![log_prefix](https://cloud.githubusercontent.com/assets/1064211/10019336/09019940-613d-11e5-9ca1-d5c51b6be362.png)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ImpressTV/nifi NIFI-985

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/90.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #90
    
----
commit 90741868a8b7d42f5949fd741e2276c024a5866a
Author: Joe <[email protected]>
Date:   2015-09-22T13:04:37Z

    NIFI-985: Custom log prefix for LogAttribute processor
    
    Log prefix helps to distinguish the log output of multiple LogAttribute 
processors and identify the right processor. Log prefix appears in the first 
and the last log line, followed by the original 50 dashes. If you configure log 
prefix 'STEP 1: ' the log output looks like this:
    
    STEP 1 :  --------------------------------------------------
    Standard FlowFile Attributes
    Key: 'entryDate'
            Value: 'Tue Sep 22 15:13:02 CEST 2015'
    Key: 'lineageStartDate'
            Value: 'Tue Sep 22 15:13:02 CEST 2015'
    Key: 'fileSize'
            Value: '9'
    FlowFile Attribute Map Content
    Key: 'customAttribute'
            Value: 'custom value'
    STEP 1 :  --------------------------------------------------
    
    flow file content...

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to