Am using Kinesis Client Library (KCL) to subscribe to kinesis stream. All the KCL logs are printed on console. I need to dump all the logs to file. I tried adding log4j.properties and common-logging.properties files in src folder, but not able to sort out.
Dump Kinesis Client Library (KCL) logs to file
1.7k Views Asked by Sunil Gulabani At
2
There are 2 best solutions below
0

KCL uses Apache Commons Logging (common-logging) in the background.
Try using slf4j with jcl-over-slf4j dependency included (or logback).
That way, your general log collector (slf4j) will handle both your application logs and the logs generated by org.apache.commons.logging.Log
interface in Amazon classes.
You could also use logback.xml
Create logback.xml file with following contents