I want to load a different log4j.xml file in DEV vs PROD. I believe
this is exactly what framework ids were meant for. Unfortunately, I
haven't been able to get this to work. I found an old thread on this
(
http://groups.google.com/group/play-framework/browse_thread/thread/
bdfa056c63e2b17b/cd8d2d2e3ebf0b9f) but it wasn't clear to me whether
there was a resolution.
This is what I have configured in application.conf:
application.log.path=/log4j.xml
%prod.application.log.path=/log4j.prod.xml
But when I start my app in prod mode ("play run --%prod"), it still
uses the dev version ("/log4j.xml") based on the logging output I see
(I changed the logging format in PROD in order to test if this works).
What's odd is that the I believe the "%prod.application.log.path"
property is actually being read because if I intentionally misspell /
log4j.prod.xml to /log4j.blah.xml, then the logging format changes.
But when I spell it correctly, it doesn't abide by what I have defined
in /log4j.prod.xml, instead it uses /log4j.xml!!
Really strange. Is this a bug? Anyone able to use a different
log4j.xml file depending on framework id?
Thanks,
J