0
votes

How can I write logs to stderr, stdout, and syslog in Hadoop 2.2 or higher? I tried to use log.info, log.error, System.out.println, and System.err.println but I only got the following from the log director:

stderr : Total file length is 222 bytes. log4j:WARN No appenders could be found for logger (org.apache.hadoop.ipc.Server). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

stdout : Total file length is 0 bytes.

syslog : Total file length is 34828 bytes. (I searched and can't find my contents.)

1

1 Answers

0
votes

It's a Java problem rather an Hadoop one, you did not correctly configured the Log4J.

log4j:WARN No appenders could be found for logger 

on cloudera you can find the log4j.properties into the config dir of each module.