Return-Path: X-Original-To: apmail-incubator-crunch-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-crunch-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F3028D574 for ; Sun, 23 Sep 2012 09:12:44 +0000 (UTC) Received: (qmail 86099 invoked by uid 500); 23 Sep 2012 09:12:44 -0000 Delivered-To: apmail-incubator-crunch-dev-archive@incubator.apache.org Received: (qmail 86005 invoked by uid 500); 23 Sep 2012 09:12:41 -0000 Mailing-List: contact crunch-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: crunch-dev@incubator.apache.org Delivered-To: mailing list crunch-dev@incubator.apache.org Received: (qmail 85970 invoked by uid 99); 23 Sep 2012 09:12:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Sep 2012 09:12:40 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.227.17.8] (HELO moutng.kundenserver.de) (212.227.17.8) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Sep 2012 09:12:32 +0000 Received: from mafr.de (krlh-4d0347f1.pool.mediaWays.net [77.3.71.241]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0LwVGF-1TXxXD3ZAV-018KH3; Sun, 23 Sep 2012 11:12:01 +0200 Date: Sun, 23 Sep 2012 11:11:59 +0200 From: Matthias Friedrich To: crunch-dev@incubator.apache.org Subject: Re: Logging/Debugging Message-ID: <20120923091158.GB15732@mafr.de> Mail-Followup-To: crunch-dev@incubator.apache.org References: <20120922075229.GA25587@mafr.de> <20120922160524.GA2517@mafr.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V02:K0:xwPrhY1qPXO7mqn71WxVGMwvDGbrnRkw70QXITEdUaV OOnc/RslYaPi5t/6PhY7tpXVQWoAyzXhe208KybGlQRq/kxqSI gyoZncfeVzIKTwszLMmayebYNUFHY0EFtbeDC/tW8mnVbf60YS g8uT8fnbNy/6irP2EX79MbWg1LpClshguG1xhi6PXVqOsUdwKM hViz2VIvGdm9kMd5Ypq8FVnizg/c7ygawNVprh8O0IKSutoh+T p2DegwGkJs3eOFBElRJYbSH9+Nfe/fZaY/+hI11l8D7vshSZMT T4Y4VObaeZ/bnDEVCR8GDvcdq+CfrvfVHpzIgCP9ZvHa3isZw= = X-Virus-Checked: Checked by ClamAV on apache.org On Saturday, 2012-09-22, Josh Wills wrote: [...] > Perhaps I'm being dense-- once we remove log4j.properties from the > core, won't we stop logging the Crunch status information unless the > developer explicitly configures it in their own log4j.properties? > That may of course be what the developer desires, but my thought was > that we typically do want that information logged, and that > repeating it in every log4j.properties file for every project would > be tedious. At second glance it seems there are a few misconceptions on how logging works with Hadoop. When running from the IDE with LocalJobRunner, log4j.properties has no effect because there's no log4j on the classpath; commons-logging just uses java.util.logging which logs on INFO level. Users who have log4j on the classpath will see different results, but they will have to add it themselves, as neither hadoop-client nor hadoop-core will provide it for them. When running jobs using "hadoop jar", our log4j.properties doesn't have an effect either because Hadoop's conf/log4j.properties takes precedence (even with HADOOP_USER_CLASSPATH_FIRST). This surprises me, to be honest, but Crunch's INFO messages are still printed, which is good. What also surprises me is that the log4j setup code in enableDebug() doesn't seem to have any effect; AFAICS, Hadoop INFO messages already appear on the console. All I get when calling enableDebug() is a log message "Could not find console appender 'A'". Is there something broken? What's the intention behind the log4j code in enableDebug()? Unless I'm overlooking something (quite possible) this seems like a no-op. > Assuming that is the case, perhaps we could add a default > log4j.properties file to the maven archetype that generates Crunch > projects? Ah, that reminds me: We haven't decided yet if we want an archetype in Crunch. Regards, Matthias