Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Hi, I want to have the name of my log file to be decided at run time. Like, suppose a command line argument is to be included in the log file name. How to do it, declaratively..i.e. using log4j.properties file or log4j.xml file ?
This is how it can be done, programmatically :-
It has to be rolled. I feel it is quite a common requirement, whenever you want to run your program everyday, for different args passed to it.
I'd recommend using "-Dlog4j.debug" on the command line when you're working on setting that up so you can see how log4j is getting configured. If you're programmatically setting the system property you'll need to make sure the system property is set before log4j tries to use it, especially if you've got log4j.properties or log4j.xml in the classpath.
If you're gonna buy things, buy this thing and I get a fat kickback:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth