It would appear this is not possible: http://mail-archives.apache.org/mod_mbox/velocity-user/200503.mbox/%3C376e3b1405032910443141616c@mail.gmail.com%3E
سؤال
I have a webapp that uses velocity for logging. The velocity.properties file has 2 lines:
runtime.log = ${solr.config}/../logs/browse.log
runtime.log.logsystem.class=org.apache.velocity.runtime.log.SimpleLog4JLogSystem
solr.config is a property defined in the webapp. When the webapp is built, ${solr.config} is updated to the property value.
Is it possible to "remodel" solr.config as a system property (thus allowing me set the log file dir at runtime)? E.g. lets call prop solr.config.sys, is it possible for the runtime env to work out the following:
runtime.log=${solr.config.sys}/logs/preview.log
, as my testing so far shows that velocity looks for "${solr.config.sys}/logs/preview.log" and does not attempt to replace system property. I did something similar before in log4j using a system property to define the logging directory.
Thanks.
المحلول
لا تنتمي إلى StackOverflow