I discoved that my changes to the log4j file DID take effect when I ran the app in Hadoop. I was expecting the Eclipse plugin to use the Hadoop log4j file even when the program was run as a standalone Java application but it was not! I added a log4j properties file to the classpath and my logging is now working for both instances.
Thanks for all the help :) 2009/8/11 Steve Loughran <[email protected]> > John Clarke wrote: > >> Thanks for the reply. I considered that but I have a lot of threads in my >> application and it's v handy to have log4j output the thread name with the >> log message. >> >> It's like the log4j.properties file in the conf/ directory is not being >> used >> as any changes I make seem to have no effect! >> > > Make sure there isn't a log4j. properties file in any JAR you are using; it > will get picked up first. > You can use Ant's <whichresource> task to find this out for you; give it > the classpath you are using and it will set a property to the first instance > of the resource that the classloader finds > >
