Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 16170 invoked from network); 26 Feb 2008 00:39:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Feb 2008 00:39:46 -0000 Received: (qmail 46670 invoked by uid 500); 26 Feb 2008 00:39:40 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 46640 invoked by uid 500); 26 Feb 2008 00:39:40 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 46631 invoked by uid 99); 26 Feb 2008 00:39:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2008 16:39:40 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jukka.zitting@gmail.com designates 66.249.92.170 as permitted sender) Received: from [66.249.92.170] (HELO ug-out-1314.google.com) (66.249.92.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 00:39:06 +0000 Received: by ug-out-1314.google.com with SMTP id j3so967088ugf.49 for ; Mon, 25 Feb 2008 16:39:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=LPBf7NF93aDAwNixCgTrNnULr1+ns05ZVhd86abBxNE=; b=BhE9D1g4g+d3YwSGomsUCEXYJIPpqZDMnPRJWLQ5sSLgBZUYxvwE4GDWNQQ710rArgkTatmVaP4RuztqyPXdJ8GpQvtJWorxW3v7Ne+hyFZaAX6W8/wMVaSLOOvaDyFCyjAiIRjnBFIJQ3oyL0g2GoIZanqkeQ+HxQg22mC2n4Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WZyKZisWXgwxRE7Z8mCiVknfoZgXa2Cf+2JbgqCZyes+g/MnpcUnMNRQWeYL+RctOXNWHo94ON09jAfpOX11vblacbyzH5XOu9NmH6XwdAHJj9UAAhRCvjP2NrWvDji5o5krL9M/pN0egnnUUEV/6UVjPWndxZYN132qOKnSuUY= Received: by 10.142.165.9 with SMTP id n9mr3000002wfe.93.1203986352969; Mon, 25 Feb 2008 16:39:12 -0800 (PST) Received: by 10.142.213.16 with HTTP; Mon, 25 Feb 2008 16:39:12 -0800 (PST) Message-ID: <510143ac0802251639n6059e581r9a9d2592f1340e97@mail.gmail.com> Date: Tue, 26 Feb 2008 02:39:12 +0200 From: "Jukka Zitting" To: dev@jackrabbit.apache.org Subject: Re: Logging in Tests In-Reply-To: <81749DF1-A66B-4096-A205-794200625994@day.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8F4B7F30-A339-4380-9B0D-3188ADE3479F@day.com> <510143ac0802251202mb253889l776baca5fcc29144@mail.gmail.com> <81749DF1-A66B-4096-A205-794200625994@day.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, On Tue, Feb 26, 2008 at 12:02 AM, Alexander Klimetschek wrote: > Am 25.02.2008 um 21:02 schrieb Jukka Zitting: > > What's the reason for logging in test cases? > > Why do other test cases in Jackrabbit use the logging? Why is there a > logger in the JUnitTest base class? The logger is mostly used for setup and teardown code. > The test case is somewhat more complex as it starts an external > application. This setup can fail and logging helps in seeing the > problem. OK, I can understand the need for complexity in setup code, though IMHO that's still a sign of trouble. If it's something people generally set up in client applications, you should a utility class or something (with it's own logging) for doing that. If it's not something people do, then the test case probably isn't needed. Anyway, for such cases I'd just use SLF4J logging as we do everywhere else. I don't really understand why the TCK code needs the LogPrintWriter construct, but I guess it's there as a bridge for older code or a pre-SLF4J attempt to avoid a fixed dependency to a specific logging framework. Perhaps we should just refactor LogPrintWriter away. BR, Jukka Zitting