Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set log level from command line #16

Open
callumj opened this issue Jun 7, 2016 · 2 comments
Open

Set log level from command line #16

callumj opened this issue Jun 7, 2016 · 2 comments

Comments

@callumj
Copy link

callumj commented Jun 7, 2016

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.

@tlubz
Copy link

tlubz commented Apr 26, 2017

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

@Cory-Bradshaw
Copy link
Contributor

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants