Open maytals opened 6 years ago
Yeah, there's probably not a good fix here with breaking backwards compatibility. For a work-around you can use the CUSTOM_INIT_SCRIPT
env var to eval
custom scripts / code. Alternatively mount through a log4j config file into the /opt/kafka/config/log4j.properties
location.
I'll have a think to see if there's anything we can do without having a fragile lookup table / breaking backwards compatibility.
Thank you very much for your quick response.
Is any update about this bug, it is really critical if you want to make advanced log4j configuration
As per my above comment, there is a work-around. If this is important to you i'd suggest giving the original post a thumbs-up (as currently it only looks like the issues is encountered by one person)
I've ran into it just today (and was about to file an issue, but found this).
I wanted to configure the following logger:
log4j.logger.kafka.log.LogManager=ALL
Can you elaborate how to do "Alternatively mount through a log4j config file into the /opt/kafka/config/log4j.properties location."? Thanks.
Found it. The following should be in docker-compose.yml
:
volumes:
- ./log4j.properties:/opt/kafka/config/log4j.properties
There's not an option to override properties such as:
log4j.appender.stateChangeAppender.DatePattern='.'yyyy-MM-dd-HH
(in log4j.properties)The reason is that the property name has an upper case letters in it and in the code all the upper case letters are converted to lowercase letters: https://github.com/wurstmeister/kafka-docker/blob/fcef1c929e0db173fc9e5b1d8f01597d17e9f103/start-kafka.sh#L133