Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7278711E7F for ; Sun, 18 May 2014 20:01:04 +0000 (UTC) Received: (qmail 66076 invoked by uid 500); 18 May 2014 19:36:01 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 32629 invoked by uid 500); 18 May 2014 19:11:00 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 27923 invoked by uid 99); 18 May 2014 18:59:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 May 2014 18:59:54 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yuzhihong@gmail.com designates 209.85.220.41 as permitted sender) Received: from [209.85.220.41] (HELO mail-pa0-f41.google.com) (209.85.220.41) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 May 2014 18:59:49 +0000 Received: by mail-pa0-f41.google.com with SMTP id lj1so4792262pab.28 for ; Sun, 18 May 2014 11:59:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=bw20zfUzXKsr1sKFnj8+s31CUjeCqmQ1JxmVjFdSlos=; b=dBuCXcakY0j0w534OebAp2sCGBW52/kvURS0f7UrkhGz61jsDqwNRLDj4T2Sl+2hJ/ v4XgYSn9HyDGmPDibPaj8vqf1d8LANlDab3Z4LeMFsaijW9hG7qxESLMzO6lQG2K8S97 mjxhCc0F9pImBmEIRmCpCCvJw87blWIkxjetMDcvC1yxnow+KYBrOFSz2PfEOp+pLTal +JrG2W+xE7mHt91wW54AWw4X/g/mUQtyHh/VhtOfJZLYVGLPTu2/+Ih6b+5c/SIc+bSH aNy3i7xnmJPGgihSlzIkF5KUnFHkgp+PR32IAOFH42eBUibjqmjRHH3Tv6l0uNfm7oKS yZNg== X-Received: by 10.66.146.170 with SMTP id td10mr37334399pab.105.1400439569554; Sun, 18 May 2014 11:59:29 -0700 (PDT) Received: from [10.173.101.123] (22.sub-70-197-9.myvzw.com. [70.197.9.22]) by mx.google.com with ESMTPSA id wp3sm25897510pbc.67.2014.05.18.11.59.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 18 May 2014 11:59:28 -0700 (PDT) References: <5378D86B.9070607@hft-leipzig.de> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: multipart/alternative; boundary=Apple-Mail-23DCB1CD-6455-496F-BC7E-B05BD9BD53CB Content-Transfer-Encoding: 7bit Message-Id: Cc: "user@hadoop.apache.org" X-Mailer: iPhone Mail (10B146) From: Ted Yu Subject: Re: where to put log4j.properties for logging out of MR job? Date: Sun, 18 May 2014 11:59:27 -0700 To: "user@hadoop.apache.org" X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-23DCB1CD-6455-496F-BC7E-B05BD9BD53CB Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Please see the reply from oers in this thread: http://stackoverflow.com/questions/9081625/override-log4j-properties-in-hado= op On May 18, 2014, at 10:38 AM, bo yang wrote: > It might be caused by multiple log4j.properties files in your class path (= e.g. in different jar files). For example, I find hadoop-mapreduce-client-jo= bclient-2.4.0-tests.jar in my class path, and there is log4j.properties insi= de it. I have to manually delete it to get logging written to files. >=20 >=20 > On Sun, May 18, 2014 at 8:57 AM, Sebastian G=C3=A4de wrote: >> Hi, >>=20 >> I'd like to log events within my MR application using Flume writing to a c= entral log file. I've followed http://flume.apache.org/releases/content/1.4.= 0/FlumeUserGuide.html#log4j-appender putting the stuff into Hadoop's log4j.p= roperties and copying it to Hadoop's conf directory on all nodes. >>=20 >> However, my in-application events are only logged to stdout (I can see th= em using the YARN webapp) but not to Flume. Although I thought Hadoop's conf= directory is added to classpath, it does not seem to work for me. >>=20 >> Could you please tell me where I should put the log4j.properties? >>=20 >> Cheers >> Seb. >=20 --Apple-Mail-23DCB1CD-6455-496F-BC7E-B05BD9BD53CB Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Please see the reply from oers in this= thread:


On May 18, 2014, at 10:38 AM, bo yang <bobyangbo@gmail.com> wrote:

It might be caused by multiple lo= g4j.properties files in your class path (e.g. in different jar files). For e= xample, I find hadoop-mapreduce-client-jobcl= ient-2.4.0-tests.jar in my class path, and there is log4j.properties inside i= t. I have to manually delete it to get logging written to files.


On Sun, May 18= , 2014 at 8:57 AM, Sebastian G=C3=A4de <s116102@hft-leipzig.de><= /span> wrote:
Hi,

I'd like to log events within my MR application using Flume writing to a cen= tral log file. I've followed http://flum= e.apache.org/releases/content/1.4.0/FlumeUserGuide.html#log4j-= appender putting the stuff into Hadoop's log4j.properties and cop= ying it to Hadoop's conf directory on all nodes.

However, my in-application events are only logged to stdout (I can see them u= sing the YARN webapp) but not to Flume. Although I thought Hadoop's conf dir= ectory is added to classpath, it does not seem to work for me.

Could you please tell me where I should put the log4j.properties?

Cheers
Seb.

= --Apple-Mail-23DCB1CD-6455-496F-BC7E-B05BD9BD53CB--