omarsmak / kafka-consumer-lag-monitoring

Client tool that exports the consumer lag of Kafka consumer groups to Prometheus or your terminal
MIT License
50 stars 13 forks source link

Log formatting support #15

Closed dr460neye closed 3 years ago

dr460neye commented 4 years ago

Hi there,

support for log formats would be really helpful in an container orchestration world. Mostly two thing are used. Either JSON format, or classic log format. Right now its some kind of a mix of multiple formats due to the kafka default logging.

What do you think about that?

omarsmak commented 4 years ago

That is actually a good hint! If I recall, having something like JSON logging format simplifies scrapping the logs from the container, isn't? I am thinking if we make customizable through log4j properties file that can be supplied through env variable and some configurations through env variables as well if needed, WDYT?

dr460neye commented 4 years ago

I would think about both. Add either by mounting a configmap file as an option, or as an env var like: LOG_PATTER = Myregex(%VARX%)Myregex etc.

omarsmak commented 4 years ago

Sure. As always, a PR would be highly appreciated ;)

omarsmak commented 3 years ago

Resolved by #28, now the logging is configurable through a properties file or even from environment variable