Back Forum Reply New

spring configure log4j catch22

,joe@domain.com

and I want to use those properties to configure log4j.

unless I use -D args when I start up the app, I seem to run into a catch22 because Spring wants to use the logger when the context starts up.

I used the PropertyPlaceHolder so I can use ${some.prop} from within the context.xml file, but if I try to reset the log4j config with a new config that uses ${log.file}....it won't be evaluated correctly.  Basically, using PPH it appears you can only use variables in the xml context, but not in another config file....like log4j.

how are other getting around that?

I just used my main method to export every property found in the app.props file as a system prop.  Then anybody can use it....spring or log4j.  This seems to make PPH worthless though...which seems quot;wrongquot;
¥
Back Forum Reply New