31z4 / zookeeper-docker

Docker image packaging for Apache Zookeeper
MIT License
285 stars 243 forks source link

JSON logging #154

Closed janhoy closed 10 months ago

janhoy commented 11 months ago

Is your feature request related to a problem? Please describe.

More and more cloud native users request JSON-format structured logging which is easier to aggregate and parse by log collectors. There is a trend towards standardizing on this.

Describe the solution you'd like

I'd like it to be easy to enable JSON logging in Zookeeper docker image.

Describe alternatives you've considered

I have filed an issue in upstream Zookeeper project (https://issues.apache.org/jira/browse/ZOOKEEPER-4757). But the maintainers are reluctant to include the extra JARs and sample appender to make it happen.

Additional context

It is by far easier to include (and keep up to date) added jar dependencies in the upstream project than in a downstream Dockerfile. I hope you can chime in on the JIRA above and bring some perspective or suggest smarter solutions that will not require every single end user to build their own custom docker image.

31z4 commented 10 months ago

I tend to turn down the idea of shipping additional jar files with the image in order to simplify JSON logging.

As discussed in the upstream issue it would required either:

First option is not reliable nor secure. Second option is out of scope for the Docker image packaging. IMO, the image itself should be as close to vanilla distribution as possible.

janhoy commented 10 months ago

That's fair. If the goal of the image is to mimic upstream 1:1 then users must look elsewhere for a more production ready and feature rich image. Closing.