Dynamically loading the IP/machine name in originHost

Hello all,

I have application deployed in different server nodes and needs to collect all the logs to a single centralised grey log server. I need to classify the logs based on the source. For that I need to get the originHost name dynamically from properties.
log4j.appender.graylog.originHost={dynamically get IP/name from the machine where application is deployed}.

I have tried many option like log4j.appender.graylog.originHost=${hostName}, but not working.

Can anyone please help?

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