fvaleri commented on code in PR #23771:
URL: https://github.com/apache/kafka/pull/23771#discussion_r4325851356
##########
docker/jvm/Dockerfile:
##########
@@ -96,8 +96,15 @@ RUN mkdir opt/kafka; \
chown appuser:appuser -R /usr/logs /opt/kafka /mnt/shared/config; \
chown appuser:root -R /var/lib/kafka /etc/kafka/secrets /etc/kafka; \
chmod -R ug+w /etc/kafka /var/lib/kafka /etc/kafka/secrets; \
- cp /opt/kafka/config/log4j2.yaml /etc/kafka/docker/log4j2.yaml; \
- cp /opt/kafka/config/tools-log4j2.yaml
/etc/kafka/docker/tools-log4j2.yaml; \
+ # Kafka moved to log4j2 in 4.0 (KAFKA-9366); older archives ship log4j 1
configs, which their
+ # KafkaDockerWrapper reads from /etc/kafka/docker under the old names.
+ if [ -f /opt/kafka/config/log4j2.yaml ]; then \
+ cp /opt/kafka/config/log4j2.yaml /etc/kafka/docker/log4j2.yaml; \
+ cp /opt/kafka/config/tools-log4j2.yaml
/etc/kafka/docker/tools-log4j2.yaml; \
+ else \
+ cp /opt/kafka/config/log4j.properties
/etc/kafka/docker/log4j.properties; \
+ cp /opt/kafka/config/tools-log4j.properties
/etc/kafka/docker/tools-log4j.properties; \
+ fi; \
Review Comment:
I would suggest to report a clear error and exit 1 when neither expected
layout is present.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]