Open wltinan opened 1 year ago
Hi @wltinan,
Sorry for the delay, I wanted to perform some tests and ask the team about the issue. Unfortunately, I cannot see other way to do this for logback than adding logic to the chart/container in order to do that, or mounting a custom logback.xml file into the config directory directly.
Anyway, I consider that this should be supported by our container/chart logic a easy way to interact with the logging configuration file, so I will create a task for the team to implement this. We will reach you back here our workload allow us to address the task. Meanwhile, I will leave this issue marked as on-hold to prevent the stale bot to close it.
Hi. Hope all is well. I don't know how far ahead you are with solving this issue, but adding my comment here since I'm working on achieving JSON format structured logging from Zookeeper PODs.
I have filed an issue to the Zookeeper project (https://issues.apache.org/jira/browse/ZOOKEEPER-4757) to add the needed jar dependency and logback appender snippet, plus a way to change appender-ref by system property. But a way to provide a custom logback.xml in a CM is probably necessary for many log customization requirements, such as enabling audit logging.
~Unfortunately the response from zookeeper project is mixed so far, so I also filed a similar issue to the zookeeper Dockerfile maintainer in https://github.com/31z4/zookeeper-docker/issues/154 to get some feedback.~ UPDATE The Zookeeper project turned down the PR.
As I just realized that bitnami maintains their own Zookeeper Dockerfile, I filed an issue in that project for JSON logging feature: https://github.com/bitnami/containers/issues/51921.
This helm chart should of course allow users to completely replace logback.xml
with their own custom one, but ideally they should then use some template in order to preserve controlling log level and json logging with env.vars.
Name and Version
bitnami/zookeeper:3.8.1
What architecture are you using?
None
What steps will reproduce the bug?
helm install zookeeper bitnami/zookeeper
Are you using any custom parameters or values?
no, I don't
What is the expected behavior?
I'd like to see the log file(zookeeper.log) under /opt/bitnami/zookeeper/logs directory but no files are found. It seems container default output is standard output.
I saw a post about changing the log4j config (ZOO_LOG4J_PROP = 'INFO, ROLLINGFILE') but in zookeeper version 3.8.1, logback was used not log4j, so it was not suitable. How can I leave log files under /opt/bitnami/zookeeper/logs?
What do you see instead?
/opt/bitnami/zookeeper/conf/logback.xml
I have no name!@kafka-log-kafka-zookeeper-0:/opt/bitnami/zookeeper/logs$ ls -al total 0 drwxrwxr-x 2 root root 6 Jun 18 15:36 . drwxr-xr-x 1 root root 18 Jun 18 15:36 ..
Additional information
No response