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

How do I turn off noisy KCL 2.0 logs?

Open jordanhamill opened this issue 5 years ago • 1 comments

Previously I was able to just add -Djava.util.logging.config.file=commons-logging.properties where commons-logging.properties looked like:

.level=WARNING

jordanhamill avatar Jan 31 '20 11:01 jordanhamill

To address this, have my Python script use a rotating file logger, then run the KCL with a Python wrapper. That wrapper optionally redirects all KCL logs (both from stderr and stdin) to stdout, and then I pipe a live tail of the log file to stderr. This let's us use a toggle setting so that if we don't want the KCL log vomit, we can simply just pipe that stdout to devnull. It's not a perfect solution, but it seems to work really well for us to silence the noise. Unfortunately, it's an all or nothing solution and doesn't let us set a log level on that output.

ghost avatar Mar 08 '20 15:03 ghost