janhoy commented on PR #2076: URL: https://github.com/apache/zookeeper/pull/2076#issuecomment-1758558715
> I strongly advise against this for [the reasons I stated on ZOOKEEPER-4757](https://issues.apache.org/jira/browse/ZOOKEEPER-4757?focusedCommentId=17774138&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17774138). > > I explained a lot more, but essentially, it boils down the last line: > > > Logging is hard enough, let's not make the situation worse by adding more complexity for a one-off use case. I can see your viewpoint. But I think this is a difference of philosophy from a programmers standpoint and an end users standpoint. As programmers we appreciate flexibility of choosing one logging library when we import many different libraries into our Java application. So when Zookeeper is consumed as a library, the "user" is the developer who will perhaps want to bridge everything to log4j2, and heavily cusomize the log config etc. A different kind of end user is the OPS person in charge of a huge K8S cluster who will install Solr or another app requiring a ZK cluster. They consume Zookeeper through some Helm chart and could not care less whether Zookeeper is a Java app and even less about swapping log libraries. They interact with helm values and environment variables and do not want to have to rebuild and maintain each app or re-package docker images. They want to configure the app and spin it up. Choose log format and log level and next they know logs are flowing into Splunk without hours of custom log parsing customization. If your comment is to be interpreted as a veto (you have to agree among yourselves), I'm willing to scale down the PR so that it only includes: * `logback-ecs-encoder` dependency (28kb) * An added `CONSOLE-JSON` appender in logback.xml with the sample config * Make `appender-ref` configurable by sysProp but still default to `CONSOLE` * In documentation, explain that JSON logging can be done flexibly in many ways, but refer to the new appender as an example (which can be activated by `-Dzookeeper.log.appender=CONSOLE-JSON` This way it will be a more light weight feature, but still fairly simple for even Docker/Helm users to enable the logic without supplying their own custom JARs or xmls if they don't have need for further customization. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org