I'm trying to modify the name of the logfile that is created by Artemis to include the hostname.
In the logging.properties under the broker instance, I've the below defined.
# File handler configuration
handler.FILE=org.jboss.logmanager.handlers.PeriodicRotatingFileHandler
handler.FILE.level=DEBUG
handler.FILE.properties=suffix,append,autoFlush,fileName
handler.FILE.suffix=.yyyy-MM-dd
handler.FILE.append=true
handler.FILE.autoFlush=true
handler.FILE.fileName=${artemis.instance}/log/artemis_${hostname}.log
handler.FILE.formatter=PATTERN
Somehow the ${artemis.instance}
gets resolved correctly, however the ${hostname}
is not being evaluated.
I'm not sure where artemis.instance
is defined, so I can define hostname
the same way? Or if there is a way to access the hostname some other way? I'm running on Redhat environment.
The system property artemis.instance
is defined in the bin/artemis
script. However, you can just use bin/artemis.profile
and set -Dhostname=myHost
there in JAVA_ARGS
.