Peon's using same log4j config as the middle manager

Hi all,

I would like to use a RollingFileAppender for the middle manager log. I can easily edit the _common/log4j2.xml file to accomplish this, but unfortunately the peon processes also use the same config file. I have tried adding:

druid.indexer.runner.javaOptsArray=["-XX:OnOutOfMemoryError=kill -9 %p","-Dlog4j.configuration=file:/services/druid/conf/middleManager/peon-log4j2.xml"]

To the middle manager runtime.properties file, but it does not get picked up.

Can anyone point me in the right direction here?

Thanks,

Druid uses log4j2 so it’s log4j.configurationFile not log4j.configuration: https://logging.apache.org/log4j/2.0/faq.html#config_location

Fun tidbit, since 0.9.0 you can use

${sys:druid.metrics.emitter.dimension.dataSource}

``

in the log4j2.xml to get the dataSource of the task in the config file

Just wondering is it possible to change peon task log file pattern e.g yyyy-mm-yy-hh?

This is not possible without modifications to the task logs config and pusher files.