|
|
John Clarke 2009-08-07, 16:10
Hi,
I am using Hadoop 0.18.3. I'm trying to get my app to output DEBUG messages to the console using a custom conversion pattern.
I'm editing the log4j.properties file in the conf folder but the changes don't seem to work. All the log messages are still INFO and higher and the pattern is not changing either.
I'm currently running as a local Java app in Eclipse rather than in Hadoop.
Any ideas?
Cheers, John
bharath vissapragada 2009-08-08, 02:03
Print Statements worked out in my case ,,, Dunno whether that approach is right or not .. but it works fine .. On Fri, Aug 7, 2009 at 9:40 PM, John Clarke <[EMAIL PROTECTED]> wrote:
> Hi, > > I am using Hadoop 0.18.3. I'm trying to get my app to output DEBUG messages > to the console using a custom conversion pattern. > > I'm editing the log4j.properties file in the conf folder but the changes > don't seem to work. All the log messages are still INFO and higher and the > pattern is not changing either. > > I'm currently running as a local Java app in Eclipse rather than in Hadoop. > > Any ideas? > > Cheers, > John >
John Clarke 2009-08-10, 10:27
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! 2009/8/8 bharath vissapragada <[EMAIL PROTECTED]>
> Print Statements worked out in my case ,,, Dunno whether that approach is > right or not .. but it works fine .. > > > On Fri, Aug 7, 2009 at 9:40 PM, John Clarke <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > I am using Hadoop 0.18.3. I'm trying to get my app to output DEBUG > messages > > to the console using a custom conversion pattern. > > > > I'm editing the log4j.properties file in the conf folder but the changes > > don't seem to work. All the log messages are still INFO and higher and > the > > pattern is not changing either. > > > > I'm currently running as a local Java app in Eclipse rather than in > Hadoop. > > > > Any ideas? > > > > Cheers, > > John > > >
Steve Loughran 2009-08-11, 10:36
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
John Clarke 2009-08-14, 14:08
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 > >
|
|
All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by
Sematext