MyEclipse: log4j.properties config
blaine_mincey - Jun 28, 2004 - 09:26 PM
Post subject: log4j.properties config
My development team currently uses log4j for our logging functionality within our web application. I usually will perform some "simple" unit tests on each of my POJO's utilizing the main method. I would like to be able to tell eclipse to use my "developer" log4j.properties file.
How can I do this? With the 2.x version I was able to create a variable and add it to the build path of my project and that worked. With the 3.x version, it does not allow me to do this.
Any ideas on how I can get Eclipse to recognize a log4j.properties file so I can run my unit test?
Thanks in advance.
support-rkalla - Jun 28, 2004 - 10:22 PM
Since this isn't related to MyEclipse I'm going to move it to Random Thoughts (our open forum). On a side note, how come you can't use the Java Build Path > Add Variable command? I just tried it on my Eclipe 3.0 setup and it worked fine. I clicked "Configure Variables" and added a new variable that pointed at a properties file in my project, then I added it to my build path.
blaine_mincey - Jun 29, 2004 - 01:32 PM
Sorry for placing this in the incorrect forum.
Yes, what you explained is EXACTLY what I did when using Eclipse 2.x. But, when doing it with 3.x, I get the little "X" next to my project name. Going into project properties shows that I have a message "Build path entry is missing: LOG4J_PROPS".
Any advice would be most appreciated.
Thanks for your reply!
support-rkalla - Jun 29, 2004 - 04:45 PM
Ahh jeez I think all that stuff I typed out I was doing when I was running Eclipse 2.1 (I still have both installed). I just loaded up 3.0 and noticed that the file filter for new variables is JAR/ZIP... what's that all about?
Anyway I checked on a project that I do use properties files for, and I just ended up placing them in the /src tree so they were naturally in the classpath after a project build. I know this isn't what you were looking for, but maybe that's the only way to do it?
Did you check the Eclipse forums? Those guys are pretty helpful.
blaine_mincey - Jun 29, 2004 - 05:52 PM
Thanks so much for the response. I will do as you suggested for the time being. And here is a stupid question for you, I am actually embarrassed to ask.........but, where exactly are the eclipse forums? I have gone to eclipse.org many times but never was able to find a forum or place to request a userid/password, etc.
Do you have a link by chance?
Thanks in advance!
support-rkalla - Jun 29, 2004 - 06:45 PM
That's not a stupid question at all, actually I was wrong they haev mailing lists and newsgroups. Both are excellent and very active.
Mailing lists: http://www.eclipse.org/newsgroups/index.html
All times are GMT - 6 Hours
Powered by PNphpBB2
© 2003-2004 The PNphpBB GroupCredits