To clarify how Chainsaw avoids duplicates, ChainsawCyclicBufferTableModel maintains the collection of IDs which exist in the table model's unfiltered list. If an event is received which already has that ID, the event isn't added to the model.
This is a fragile workaround - would like to rely on loggingevent's .equals method but I don't think the .equals issues of contained objects (throwable info/location info) were completely addressed. If they were, I could just use a set and not track the IDs.
The ID lookup also causes a problem now that Chainsaw supports the dynamic creation of new log panels based on an expression (two panels may have events with the same ID, and only the first one will get added to the model - a major deficiency).
To fix this hack in Chainsaw (which keeps this new feature from being really useful), I'd like to rely on LoggingEvent's .equals method or a similar mechanism.
The equals method was fixed a long time ago (at least several months) including checks on locationInfo and throwable. Please have a brief look at the code and let me know if I missed anything.
Avoiding duplicates is only one part of the problem. We must also list the events in order. I suppose that the ID can be used for sorting, assuming the IDs are ordered as well.
For sake of simplicity, I am ignoring the multiple panel issue, also because I don't really understand it. It seems to me that it is related but still a different problem.
By the way, the various implementations of java data structures can perform in wildly unexpected ways. For example, Vector is unexpectedly faster, much faster, than a LinkedList even if their general structure is quite similar. How difficult would it be to use a new data structure for implementing the underlying model? If it is easy, then we, I should say, you, :-) could test the alternative models which could more efficient than theorizing about them.
Scott
-----Original Message----- From: Ceki G�lc� [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 20, 2004 10:41 AM To: Log4J Developers List Subject: Re: JDBCReceiver - move from sandbox to core?
Hi Scott,
No objections to move JDBCReceiver and DeCampo's data source access code to the jdbc package in log4j proper. Changes can be added if the need arises.
Will you be improving JDBCAppender in any way? I have been quite unhappy with it in the past but have not had a chance to work on it for a long time...
JDBCReceiver docs state that PatternLayout does not support properties. That is no longer the case as PatternLayout does support properties, (%properties is the new conversion word).
How does Chanisaw deal with duplicate reports? I mean if the same event is reported twice by two separate iterations within the run method of JDBCReceiverThread?
At 07:45 AM 4/20/2004, Scott Deboy wrote: >I'm interested in moving JDBCReceiver from the sandbox project to the >main >project, in time for the 1.3 alpha release, and would like to address any >concerns folks have with the move or answer any questions. Here's a link >to the receiver: > >http://cvs.apache.org/viewcvs.cgi/logging-log4j-sandbox/src/java/org/ap >ache/log4j/jdbc/JDBCReceiver.java?rev=HEAD&view=auto > >Where I work, we use Chainsaw V2 configured to use the JDBCReceiver in >order to view database events in the UI, with good results. > >Prior to inclusion in the main project, I would like to add support for >data sources, taking advantage of Ray DeCampo's data source access code >(see ConnectionSource and implementations here:) > >http://cvs.apache.org/viewcvs.cgi/logging-log4j-sandbox/src/java/org/ap >ache/log4j/jdbc/ > >Are there issues (or changes to the code) that need addressed prior to >the >receiver getting included in the main project? > >Scott
-- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
