Passing environment variable from init script to log4j2

Hello,

I am running logstash-5.4.1.

I am running multiple instances using --path.data option
But logs from these instances go to logstash-plain.log

At the moment I have export LS_OPTS="-DInstance_Name=${2}"$LS_OPTS

And in log4j2 file I have ${sys:Instance_Name}

what is created instead is ${sys:Instance_Name}-plain.log

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.