logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Deboy" <ScottDe...@comotivsystems.com>
Subject RE: [Chainsaw] Change TableModel to store original LoggingEvent?
Date Fri, 08 Aug 2003 16:49:20 GMT
I agree Paul..

[A little background: When I started developing this version of Chainsaw, LoggingEvent didn't
have the constructors I needed, so I started out using Vectors.]

I can start on the conversion to using LoggingEvent.

A point related to MDC/NDC/Properties: I see benefit in displaying the individual entries
as cells in the table.

Column names could use a prefix with the name (MDC-[name] or 
PROP-[name]).  NDC could work the same way, naming the columns NDC-1, NDC-2, etc.

This would provide the ability to filter and hide/display these 
individual values just as we do everything else, but it doesn't mesh 
well with your idea of a popup that lists the name/value pairs for 
example (mdc/ndc/props each taking up one column in the table).


Following the conversion and added support in filters, etc., here's what 
I'm planning:

I really want LogPanel to be independent.  It'd be great to be able to 
take LogPanel and turn it into an eclipse plugin, which would also 
facilitate people's interest in embedding LogPanel in standalone apps, 

After that, I'm going to add support for a tab routing rule:

If the user wanted to route unique levels to individual tabs (across 
applications, for example), they could set [Level] as the tab routing 
rule.  If they wanted to route as we've defined it now 
(machinename/app), they could define '[PROP-log4jmachinename].[PROP-log4japp]' as the tab
routing rule.

The QuickFilter is great but isn't as powerful as I'd like.  I'm 
thinking about adding a popup that allows multiple rules to be defined 
and ordered.

The Display/Color Filtering window needs to be intuitive and I've got a 
layout in mind that should work well. (we can discuss this later).

That's what I'm thinking...anyone have opinions or concerns?


-----Original Message-----
From:	Paul Smith [mailto:paul.smith@lawlex.com.au]
Sent:	Thu 8/7/2003 3:28 PM
To:	log4j-dev@jakarta.apache.org
Subject:	[Chainsaw] Change TableModel to store original LoggingEvent?
Hey All,

Scott and anyone else, I've doing some thinking about the Detail pane
formatter stuff, and I am wondering whether we should store the original
LoggingEvent object rather the decode it into a Vector of elements for
the columns. 

Given that the Columns are initialized in a particular order, and
regardless of how the user visually orders the columns, TableModel
should request a specific logical Column number and maps it to the
visual index on screen.  At least that's the way I read it in the API
and in the Swing book I have.

We could then use a switch statement for the column/row index in
TableModel.getValueAt(int, int), and map it to the particular data
element within the LoggingEvent object for that row.

This gives us a couple of advantages:

(1) Reuse the Log4j Layout infrastructure

We could then configure a number of these and allow the user to switch
(one of the implementations could even be an XSLT-based version using a
directory of XSLT files to be used as "skins" for the detail).

Otherwise this interface would have to pass in a Collection, and that's
a little confusing to potential coders of the impl, be nice if it was
just LoggingEvent, a well known entity.

(2) MDC/NDC/Properties 

Right now it's a list of the details of these properties in a single
column. Having the original LoggingEvent would allow us to have the
original data structure, and display the details in a popup window on
double click, say.  E.g. for Properties/MDC, a small table with
Key/Value columns, for NDC, a simple ordered List table. 

* It would save on CPU for the decoding.  The underlying Vector data
structure is synchronized, and with large volumes of LoggingEvents, the
decoding and manipulation of Vectors could contributing to some
performance loss.

Thoughts or comments (anyone)?


Paul Smith

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

View raw message