[
https://issues.apache.org/jira/browse/ZOOKEEPER-4757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17774386#comment-17774386
]
Andor Molnar edited comment on ZOOKEEPER-4757 at 10/12/23 9:21 AM:
-------------------------------------------------------------------
[~janhoy]
I tend to agree with [~ctubbsii] . Please correct me if I'm wrong but is there
any other reason behind this patch then making the life of docker/helm ops
easier?
What's the use case exactly? JSON logging can be enabled by providing a
customized logback / log4j2 configuration and adding the required dependencies
to the classpath. I don't think ZooKeeper has to be rebuilt for this, but I
need to double check?
Chris is right, making devops life easier alone is not a good reason for adding
additional dependencies to vanilla ZooKeeper.
cc [~eolivelli]
was (Author: andorm):
[~janhoy]
I tend to agree with [~ctubbsii] . Please correct me if I'm wrong but is there
any other reason behind this patch then making the life of docker/helm ops
easier?
What's the use case exactly? JSON logging can be enabled by providing a
customized logback / log4j2 configuration and adding the required dependencies
to the classpath. I don't think ZooKeeper has to be rebuilt for this, but I
need to double check?
Chris is right, making devops life easier alone is not a good reason for adding
additional dependencies to vanilla ZooKeeper.
> Support JSON format logging
> ---------------------------
>
> Key: ZOOKEEPER-4757
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4757
> Project: ZooKeeper
> Issue Type: Improvement
> Reporter: Jan Høydahl
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> More and more enterprise users request structured JSON format logging for
> their applications. This removes the need for configuring custom log line
> parsers for every application when collecting logs centrally.
> Zookeeper has flexible logging through Slf4j and Logback, for which there are
> several ways to achieve JSON logging. But for end users (such as helm chart
> user) it is very difficult to achieve. It should ideally be as simple as a
> configuration option.
> OpenTelemetry is a CNCF project that has become the defacto standard for
> metrics and traces collection. They also cover logging, and they recently
> [standardized on ECS JSON
> format|https://opentelemetry.io/blog/2023/ecs-otel-semconv-convergence/] as
> their log schema for OTEL-logging. Although there are other JSON formats in
> use, a pragmatic option for zookeeper is to only support ECS.
> Proposed way to enable JSON logging:
> {code:java}
> export ZOO_LOG_FORMAT=json
> bin/zkServer.sh start-foreground{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)