vendredi 27 février 2015

How to define log4j path by application.properties?

I want to have different log4j2 log directories based on the current active profile. But it does not work.



#application.properties:
spring.profiles.active=dev
log.path=d:/${spring.profiles.active}

#log4j2.xml:
<Properties>
<property name="path">${bundle:application:log.path}</property>
</Properties>


Result: a folder is created on d:/ called ${spring.profiles.active} instead of resolving to the real spring profile name. Why?


Aucun commentaire:

Enregistrer un commentaire