Adjusting logs levels

Cloudera 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 environment variable.

  • 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 AwsSecretsManagerParameterValueProvider to understand whether or not parameters are being fetched from AWS Secrets Manager, you would set the JAVA_TOOL_OPTIONS environment variable to -Dorg.slf4j.simpleLogger.log.org.apache.nifi.stateless.parameter.AwsSecretsManagerParameterValueProvider=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 AWS Secrets Manager Parameter Value Provider and the Stateless Bootstrap class, you would set JAVA_TOOL_OPTIONS to a value of:

    -Dorg.slf4j.simpleLogger.log.org.apache.nifi.stateless.parameter.AwsSecretsManagerParameterValueProvider=DEBUG
    -Dorg.slf4j.simpleLogger.log.org.apache.nifi.stateless.bootstrap.StatelessBootstrap=DEBUG