amazon-kinesis-client-ruby
amazon-kinesis-client-ruby copied to clipboard
Set log level from command line
Is it possible to add documentation on how to set the log level of the Consumer? We'd like to log WARN
and higher, we find that INFO
is too verbose for us.
agreed with @callumj, this is super verbose, especially the cloudwatch metric logs.
Thank you for leaving this suggestion, if other customers are having trouble with configuring logging, please +1 this issue to help us prioritize this work going forward.
In general the KCL uses ApacheCommons logging, which is documented on their site: https://commons.apache.org/proper/commons-logging/guide.html#Quick_Start
This thread has recommendations for how to configure it using KCL: https://forums.aws.amazon.com/thread.jspa?threadID=192892
It is certainly possible. KCL uses apache commons logging library to log messages. Depending on the Log implementation you are using, one option is to provide appropriate logging configuration file when launching the KCL application to have your desired logging level.
For example, with Jdk14Logger (which might be default Log implementation if no other Log implementation is configured/found), I provided following commons-logging.properties file in my classpath to print only warning and error messages by default:
.level=WARNING
You can also provide the location of the properties file when launching the application:
java -Djava.util.logging.config.file=<location-of-properties-file> <MyKCLAppMainClass>