Skip to main content

How to change the log level for a Stage

  • August 24, 2021
  • 0 replies
  • 386 views

Drew Kreiger
Rock star
Forum|alt.badge.img

Question:

How to change the log level just for a specific Stage?

Answer:

From the SDC UI when editing the "Log Config" you can add a parameter to edit the log level just for one stage.

The property that needs to be added will start by log4j.logger. and be followed by an exact class name (that will set the log level for that class only) or we can also specify the package name (it will change the log level for all dependent classes in the package):

log4j.logger.${className}=<log-level>

E.g.:

  • The following parameter will change the log level to INFO just for the JDBC query origin:
log4j.logger.com.streamsets.pipeline.stage.origin.jdbc.table.TableJdbcSource=INFO
  • This one will set to DEBUG all the dependent classes from the JDBC package:

log4j.logger.com.streamsets.pipeline.lib.jdbc.multithread=DEBUG
  • To enable TRACE level on the Kafka library consumer class (to help diagnose Kafka consumer issues), you can add this line:
log4j.logger.org.apache.kafka.clients.consumer.KafkaConsumer=TRACE 

 

Mel Álvarez

November 19, 2020 14:58
This topic has been closed for replies.