Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 56730 invoked from network); 25 Feb 2008 22:02:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Feb 2008 22:02:54 -0000 Received: (qmail 57777 invoked by uid 500); 25 Feb 2008 22:02:49 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 57409 invoked by uid 500); 25 Feb 2008 22:02:48 -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 57400 invoked by uid 99); 25 Feb 2008 22:02:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2008 14:02:48 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aklimets@day.com designates 62.192.10.254 as permitted sender) Received: from [62.192.10.254] (HELO goobak01.day.com) (62.192.10.254) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2008 22:02:01 +0000 Received: by goobak01.day.com (Postfix, from userid 1212) id 243165086F; Mon, 25 Feb 2008 22:52:28 +0100 (CET) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by goobak01.day.com (Postfix) with ESMTP id DCDA55085D for ; Mon, 25 Feb 2008 22:52:27 +0100 (CET) Received: by ug-out-1314.google.com with SMTP id j3so915145ugf.49 for ; Mon, 25 Feb 2008 14:02:20 -0800 (PST) Received: by 10.78.182.17 with SMTP id e17mr786513huf.26.1203976939896; Mon, 25 Feb 2008 14:02:19 -0800 (PST) Received: from ?192.168.0.105? ( [88.74.6.96]) by mx.google.com with ESMTPS id f6sm316682nfh.21.2008.02.25.14.02.15 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Feb 2008 14:02:17 -0800 (PST) Message-Id: <81749DF1-A66B-4096-A205-794200625994@day.com> To: dev@jackrabbit.apache.org In-Reply-To: <510143ac0802251202mb253889l776baca5fcc29144@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: Logging in Tests Date: Mon, 25 Feb 2008 23:02:12 +0100 References: <8F4B7F30-A339-4380-9B0D-3188ADE3479F@day.com> <510143ac0802251202mb253889l776baca5fcc29144@mail.gmail.com> X-Mailer: Apple Mail (2.919.2) From: Alexander Klimetschek X-Virus-Checked: Checked by ClamAV on apache.org 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? > If you're writing a > complex test case where you need logging to follow the control flow, > then you're probably doing something wrong. In fact a test case rarely > should have much control flow... A sequence of operations either works > or doesn't. The test case is somewhat more complex as it starts an external application. This setup can fail and logging helps in seeing the problem. Otherwise the logging was helpful for developing the test cases - and I try to practise in all my code to keep the logging messages I wrote for myself because they document the code and simplify maintaining it later. I am just in the step of cleaning up the log code so that it does not fill up normal mvn test commands. The other (IMHO worse) solution would be to throw it all away. Regards, Alex -- Alexander Klimetschek alexander.klimetschek@day.com