amazon-kinesis-client-ruby icon indicating copy to clipboard operation
amazon-kinesis-client-ruby copied to clipboard

Set log level from command line

Open callumj opened this issue 8 years ago • 2 comments

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.

callumj avatar Jun 07 '16 22:06 callumj

agreed with @callumj, this is super verbose, especially the cloudwatch metric logs.

tlubz avatar Apr 26 '17 17:04 tlubz

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>

Cory-Bradshaw avatar Mar 20 '20 14:03 Cory-Bradshaw