Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting the logging level in Hadoop to WARN

Tags:

logging

hadoop

I've tried numerous ways of setting the logging level in Hadoop to WARN, but have failed each time. Firstly, I tried to configure the log4j.properties file by simply replacing "INFO" with "WARN" everywhere. No result.

Next, I tried to give Hadoop UNIX commands (in accordance with http://hadoop.apache.org/common/docs/current/commands_manual.html#daemonlog):

$ hadoop daemonlog -setlevel

Is it possible that one actually has to alter the SOURCE CODE to make it work? Logging is often quite simple to control, in most cases a slight adjustment of the logging properties usually does it...

like image 463
chebychev2000 Avatar asked Jan 23 '12 17:01

chebychev2000


1 Answers

I rather use

HADOOP_ROOT_LOGGER=WARN,DRFA

in hadoop-env.sh

or you can use hadoop.root.logger in log4j.properties

DRFA will allow the logs to go into the File Appender rather than Console -> System.err/out.

like image 195
Luis R. Avatar answered Sep 25 '22 00:09

Luis R.