Re: Apache NIFI: Query on logging.

2024-01-27 Thread Mark Payne
Kumar,

As Pierre noted LogAttribute can log the payload as well. However it’s worth 
nothing that it’s generally considered a bad practice to litter the flow with 
logging processors. Instead, you should take a look at NiFi’s Data Provenance 
[1] features.

Thanks
Mark

[1] https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#data_provenance

Sent from my iPhone

On Jan 27, 2024, at 10:16 AM, Pierre Villard  
wrote:

LogAttribute can log the flowfile's content. Set Log Payload to true.

HTH,
Pierre

Le sam. 27 janv. 2024 à 18:45, Kumar Kapil  a
écrit :

Hi to NIFI dev team,



I have below requirements where documentation or your assistance is
required in the logging. Currently LogMessage and LogAttribute process are
supported. But is it enough to log json object or request body and response
body. We need a processor which can log file-flow content, JSON documents
and other useful information.



*Requirement 1: *

  - Consume events from the MQTT.
  - Log the events in the log file.
  - Transform the event by using JOLT Transformation.
  - Log the transformed JSON document in the log file.
  - Invoke HTTP request and post it.
  - Log request body and response body with http status code in log
  file.



*Requirement 2: *

  - Exposed Rest API from NIFI
  - Log request body in the log file
  - Send it to Kafka.
  - Log the Kafka event in the log file.



Regards,



Kumar Kapil

Software Architect



checkpoint
systems.com


+(91) 8050050113

kumar.ka...@checkpt.com







Re: Apache NIFI: Query on logging.

2024-01-27 Thread Pierre Villard
LogAttribute can log the flowfile's content. Set Log Payload to true.

HTH,
Pierre

Le sam. 27 janv. 2024 à 18:45, Kumar Kapil  a
écrit :

> Hi to NIFI dev team,
>
>
>
> I have below requirements where documentation or your assistance is
> required in the logging. Currently LogMessage and LogAttribute process are
> supported. But is it enough to log json object or request body and response
> body. We need a processor which can log file-flow content, JSON documents
> and other useful information.
>
>
>
> *Requirement 1: *
>
>- Consume events from the MQTT.
>- Log the events in the log file.
>- Transform the event by using JOLT Transformation.
>- Log the transformed JSON document in the log file.
>- Invoke HTTP request and post it.
>- Log request body and response body with http status code in log
>file.
>
>
>
> *Requirement 2: *
>
>- Exposed Rest API from NIFI
>- Log request body in the log file
>- Send it to Kafka.
>- Log the Kafka event in the log file.
>
>
>
> Regards,
>
>
>
> Kumar Kapil
>
> Software Architect
>
>
>
> checkpoint
> systems.com
> 
>
> +(91) 8050050113
>
> kumar.ka...@checkpt.com
>
>
>
>
>