logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: LoggingEvent - equals and hashCode
Date Wed, 03 Dec 2003 19:07:04 GMT

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?

Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  

To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

View raw message