segmentio / topicctl

Tool for declarative management of Kafka topics
MIT License
580 stars 54 forks source link

json output log format #143

Open msarmadi opened 1 year ago

msarmadi commented 1 year ago

In cases, like mine, running topicctl as a job in k8s, in useful to have json output log so I don't have to parse it later. In my case much better results and less costs per event in DataDog.

I checked the logging library, which to what I see, is logrus. It has the format available, json_formatter.go. It seems a viable feature to add.

Hoping it can have interest to be implemented. I leave the way of implementation to the code owners, my personal humble idea is to add a command line option e.g. "-o json" or similar.

Pls hint me know if I am stating an already available feature.