Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 4680 invoked from network); 29 Dec 2005 19:35:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Dec 2005 19:35:50 -0000 Received: (qmail 64301 invoked by uid 500); 29 Dec 2005 19:35:47 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 64022 invoked by uid 500); 29 Dec 2005 19:35:46 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 64011 invoked by uid 99); 29 Dec 2005 19:35:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2005 11:35:46 -0800 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=SPF_PASS,X_PRIORITY_HIGH X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of boris.unckel.mlg@gmx.net designates 213.165.64.21 as permitted sender) Received: from [213.165.64.21] (HELO mail.gmx.net) (213.165.64.21) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 29 Dec 2005 11:35:45 -0800 Received: (qmail 4562 invoked by uid 0); 29 Dec 2005 19:35:23 -0000 Received: from 83.135.204.170 by www41.gmx.net with HTTP; Thu, 29 Dec 2005 20:35:23 +0100 (MET) Date: Thu, 29 Dec 2005 20:35:23 +0100 (MET) From: "Boris Unckel" To: commons-dev@jakarta.apache.org MIME-Version: 1.0 Subject: [logging] Exception handling for messages in wrapper X-Priority: 1 (Highest) X-Authenticated: #143822 Message-ID: <14664.1135884923@www41.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, in the JDK14Logger is the following code for logging to the underlying JDK Logger: log(Level.FINE, String.valueOf(message), null); message is an java.lang.Object (the Level differs from each mapping, irrelevant for my point) What happens here is a null safe operation (OK): String.valueOf(message) In case the toString Method throws an RuntimeException (due to bad code in the using system) it will influence the whole logging operation (canceled), and cause an error in the using system. Two ways of solution: 1) Ignore it, the developer of the system is responsible for correct, exception-free toString implementation of her objects. I think this is bad, because this may occure in rare runtime situations and awfully to detect. 2) Signal an error in the user log, giving a hint and a number to lookup for detailed cause. Log the detailed reason and number in the underlying log system, or in x4juli case, in the internal log. (In depracted log4j terms LogLog). I hope my description is good enough to understand the problem, please ask, this is important for any implementation. Opinions? Other solutions? No problem at all? Regards Boris --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org