Return-Path: Delivered-To: apmail-jakarta-log4j-dev-archive@www.apache.org Received: (qmail 67026 invoked from network); 3 Dec 2003 19:07:17 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 Dec 2003 19:07:17 -0000 Received: (qmail 23524 invoked by uid 500); 3 Dec 2003 19:06:54 -0000 Delivered-To: apmail-jakarta-log4j-dev-archive@jakarta.apache.org Received: (qmail 23413 invoked by uid 500); 3 Dec 2003 19:06:54 -0000 Mailing-List: contact log4j-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@jakarta.apache.org Received: (qmail 23377 invoked from network); 3 Dec 2003 19:06:53 -0000 Received: from unknown (HELO mail.qos.ch) (80.238.40.12) by daedalus.apache.org with SMTP; 3 Dec 2003 19:06:53 -0000 Received: from kal.qos.ch (kal [192.168.1.3]) by mail.qos.ch (Postfix) with ESMTP id 6EE6B1EC0ED for ; Wed, 3 Dec 2003 20:25:31 +0100 (CET) Message-Id: <5.2.1.1.0.20031203200558.02d508b8@mail.qos.ch> X-Sender: ceki@mail.qos.ch (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.2.1 Date: Wed, 03 Dec 2003 20:07:04 +0100 To: "Log4J Developers List" From: Ceki =?iso-8859-1?Q?G=FClc=FC?= Subject: Re: LoggingEvent - equals and hashCode In-Reply-To: <984A7225EFC7FD44B0B66D3A29A144002F9F16@pdxcorp1.vwsnet.com > Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I'll add the equals and hashcode methods within the hour or so. Is that OK? At 10:14 AM 12/3/2003 -0800, Scott Deboy wrote: >Had an issue yesterday with Chainsaw loading duplicate events. > >Our cyclicbuffer stores loggingevents, and was performing a 'contains' >check on the list to prevent duplicate events from being added >(duplicates could exist if an xml log file was loaded twice or if the >events came from jdk1.4 logging, for example). > >Of course, the contains check always returned false since the receiver >reconstructs the loggingevent from the xml representation and >LoggingEvent doesn't implement equals. > >I worked around it by storing a hashset of the event's ID in the model. >Duplicates show up if the events were loaded from xml or over the wire >from jdk1.4 logging. > >I know we've discussed this on the list before, but could we resolve >this? If we plan on supporting the ability to add LoggingEvents to a >collection, we need to implement equals and hashCode. > >As I looked at it, one of the more prominent issues was the >throwableinfo either being a throwable or a string[]. > >Opinions? Can we get resolution on this issue? > >Thanks, > >Scott --=20 Ceki G=FClc=FC For log4j documentation consider "The complete log4j manual" ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp =20 --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: log4j-dev-help@jakarta.apache.org