danoyoung danoyoung - 7 months ago 72
Groovy Question

log.info in ExecuteScript

I'm trying to log in an ExecuteScript component using Groovy. Whenever I call log.info nothing is written to the nifi-app.log, but when I call log.errorit does. Is there some log4j config or something else I need to do?

Using Nifi 1.0.x

In my test.groovy script:

=> nothing

2016-11-15 10:29:24,023 ERROR [Timer-Driven Process Thread-6] o.a.nifi.processors.script.ExecuteScript ExecuteScript[id=6840347a-0158-1000-ebbf-b9af3aefa022] FOO-BAZ-ERROR


In conf/logback.xml, try adding the following line:

<logger name="org.apache.nifi.processors.script.ExecuteScript" level="INFO"/>

By default I believe all processors (except LogAttribute) log at the WARN level, you can either change them individually like the above, or change all of them by changing the following line:

<logger name="org.apache.nifi.processors" level="WARN"/>

from WARN to INFO