将Hadoop中的日志记录级别设置为WARN [英] Setting the logging level in Hadoop to WARN

查看:100
本文介绍了将Hadoop中的日志记录级别设置为WARN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了很多方法将Hadoop中的日志记录级别设置为WARN,但每次都失败。
首先,我试图通过简单地将INFO替换为WARN来配置log4j.properties文件。没有结果。

接下来,我尝试给Hadoop UNIX命令(按照 http://hadoop.apache.org/common/docs/current/commands_manual.html#daemonlog ):



$ hadoop daemonlog -setlevel



是否有可能实际上需要修改SOURCE CODE以使其工作?日志记录通常很容易控制,在大多数情况下,对日志记录属性的轻微调整通常是这样做的......

请使用


HADOOP_ROOT_LOGGER = WARN,DRFA



<您可以在log4j.properties中使用hadoop.root.logger



在hadoop-env.sh中

> DRFA将允许日志进入文件附加程序而不是控制台 - > System.err / out。


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...

解决方案

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.

这篇关于将Hadoop中的日志记录级别设置为WARN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆