MDC set up for Druid logging for different environments

I have set up druid on bare metal for two environments (DEV & QA) and using the default log path provided (var/sv/process/current) for splunk integration. I am able to see the logs in splunk, but unable to verfify which is DEV and which is QA as the log path are same for both and there are no keys in splunk to identify the environment.

I was thinking to add MDC key for the environment.
Wanted to know if there is a way to do it through the configs provided or I have to add MDC keys in the code and use in the log4j xml file.
OR if there is any other way to know the log’s origin, please let me know

If memory serves Rakesh (and it was a long time ago before I was using Splunk!!!) you do get the host name I think? Could you name your hosts to include qa or dev?

Logs in Druid are generated through log4j2s – I don’t know if there’s something you could use there?

Yes I am getting host name, but don’t know if there is a way to change/edit to add the env identifier. BTW, I modified the default log4j xml file to add the environment file and it is now showing up in splunk. I had to add a small jar in the druid lib for that.