hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jogeshwar Karthik Akundi <ajkart...@gmail.com>
Subject Configuring the Container Logs
Date Tue, 22 Jul 2014 19:25:22 GMT
Hi,
I have been trying to configure the Log output of my actual job container
files (appid/containerid/sysout, syslog).

1) I want to disable DEBUG in the container logs.
2) I want to redirect a specific package into another file.

I tried the steps described in:
http://stackoverflow.com/questions/22918720/custom-log4j-appender-in-hadoop-2

but to no avail.
Whatever I do, the DEBUG logs wouldn't suppress and my package logs
wouldn't redirect.

Any pointers?

my container-log4j.properties is as below:


#set hadoop log

hadoop.root.logger=INFO,CLA


# Define the root logger to the system property "hadoop.root.logger".

log4j.rootLogger=${hadoop.root.logger}, EventCounter

# Logging Threshold

log4j.threshold=INFO


#

# ContainerLog Appender

#

#Default values

yarn.app.mapreduce.container.log.dir=null

yarn.app.mapreduce.container.log.filesize=100


log4j.appender.CLA=org.apache.hadoop.yarn.ContainerLogAppender

log4j.appender.CLA.threshold=INFO

log4j.appender.CLA.containerLogDir=${yarn.app.mapreduce.container.log.dir}

log4j.appender.CLA.totalLogFileSize=
${yarn.app.mapreduce.container.log.filesize}

log4j.appender.CLA.layout=org.apache.log4j.PatternLayout

log4j.appender.CLA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c: %m%n


#set my package log redirection here

log4j.logger.com.my.own.package=INFO,MyDRFA


#

# Recipe Daily Rolling File Appender

#


log4j.appender.MyDRFA=org.apache.log4j.DailyRollingFileAppender

log4j.appender.MyDRFA.append=true

log4j.appender.MyDRFA.File=/home/kaseya/logs/hadoop/recipe.log

log4j.appender.MyDRFA.DatePattern=.yyyy-MM-dd

log4j.appender.MyDRFA.layout=org.apache.log4j.PatternLayout

log4j.appender.MyDRFA.layout.ConversionPattern=%d{ISO8601} %p [%t] %c: %m%n



#

# console

# Add "console" to rootlogger above if you want to use this

#


log4j.appender.console=org.apache.log4j.ConsoleAppender

log4j.appender.console.target=System.err

log4j.appender.console.threshold=INFO

log4j.appender.console.layout=org.apache.log4j.PatternLayout

log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p
%c{2}: %m%n


#

# Event Counter Appender

# Sends counts of logging messages at different severity levels to

# Hadoop Metrics.

#

log4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter

log4j.logger.org.apache.hadoop.conf.Configuration=INFO


Thanks

Mime
View raw message