Harshil Gupta
Harshil Gupta

Reputation: 15

Logging to seperate file in Apache NiFi Executescript processor (python)

I want to log to a seperate file from ExecuteScript processor. I see that it logs to nifi-app.log and my logs gets lost easily. I have tried logging module of python, but looks like the jython version used in nifi doesn't support it.

Upvotes: 0

Views: 116

Answers (1)

Vikramsinh Shinde
Vikramsinh Shinde

Reputation: 2878

You can try ExecuteStreamCommand processor. Encompass your logic from ExecuteScript into a Python script file and call it using ExecuteStreamCommand as python3 my_script.py > log.txt, this creates a separate log file.

Upvotes: 1

Related Questions