confluentinc / ksql-images

KSQL platform docker images
Apache License 2.0
7 stars 21 forks source link

feat: allow users to set custom log4j configs #89

Closed agavra closed 2 years ago

agavra commented 2 years ago

Testing done:

log4j.template:

{% set kr_props = env_to_props('LOG4J_', '') -%}
{% for name, value in kr_props.items() -%}
{{name}}={{value}}
{% endfor -%}

Console:

% export LOG4J_LOG4J_FOO_BAR='baz'
% python3.9 -i confluent/docker_utils/dub.py
>>> fill_and_write_template('/Users/almog.gavra/dev/confluent/confluent-docker-utils/log4j.template', '/Users/almog.gavra/dev/confluent/confluent-docker-utils/log4j.properties')
True
% cat log4j.properties
log4j.foo.bar=baz