Adjusting logs levels

DataFlow Functions makes use of the SLF4J Simple Logger for logging purposes. You can update the log levels by adjusting the JVM's system properties.

To do so, you need to set the JAVA_TOOL_OPTIONS application setting.

  • To set a log level for a given logger, you can set the JVM system property named org.slf4j.simpleLogger.log.<logger name> to the desired log level.

    For example, if you want to enable DEBUG logging for the StandardStatelessNiFiFunction to view the actual data flow JSON being used, you would set the JAVA_TOOL_OPTIONS environment variable to -Dorg.slf4j.simpleLogger.log.com.cloudera.naaf.StandardStatelessNiFiFunction=DEBUG

  • You can also set additional logger levels by adding multiple -D options separated by spaces. For example, to enable DEBUG logs on both the DataFlow Functions framework and the Stateless Bootstrap class, you would set JAVA_TOOL_OPTIONS to a value of:
    -Dorg.slf4j.simpleLogger.log.com.cloudera.naaf.StandardStatelessNiFiFunction=DEBUG
              -Dorg.slf4j.simpleLogger.log.org.apache.nifi.stateless.bootstrap.StatelessBootstrap=DEBUG