If you want to enable debug logging of all hadoop components you can add this 
line to your log4j.properties.

log4j.logger.org.apache.hadoop=DEBUG

However, in a 3 node cluster that is doing next to nothing this produces a lot 
of log output, so I find it preferable to specify an one daemon type at a time 
to enable debug logging on, e.g.

log4j.logger.org.apache.hadoop.NameNode=DEBUG

It’s also worth while to review the hadoop daemonlog command, which can be used 
to change the log level of running daemons.

Cheers,

Rich

On Mar 24, 2015, at 10:38 AM, Charles Lamb 
<cl...@cloudera.com<mailto:cl...@cloudera.com>> wrote:

One way is to do:

HADOOP_CLIENT_OPTS="-Dhadoop.root.logger=DEBUG,console"

IHTH.

Charles

On 3/24/2015 10:25 AM, xiaohe lan wrote:
---------- Forwarded message ----------
From: xiaohe lan <zombiexco...@gmail.com<mailto:zombiexco...@gmail.com>>
Date: Tue, Mar 24, 2015 at 9:04 PM
Subject: How to enable debug log in HDFS
To: u...@hadoop.apache.org<mailto:u...@hadoop.apache.org>


Hi expert,

I am using Hadoop 2.4, I need to see the debug log of HDFS when performing
some operations. Where can I set it. I did a search in log4j.properties but
I don't what can I do with it.

Thanks,
Xiaohe



Reply via email to