I've spent some time working on enhancements to the Chainsaw UI and I thought I'd step
back and see what people think. Here's what I've implemented so far:
If there are any suggestions for improvement/changes/duplication of effort in what you
see here, please let me know.
1: LoggingEvents can now be received from a UDPAppender and XMLLayout (support for
multicast) via UDPReceiver. Just start log4j and help your neighbor debug without
leaving your desk (as long as you're on the same subnet).
2: UDPAppender looks for an "APP" system property. If found, the name/value pair is
added to the loggingevent properties - along with the machine name (or ip address if
not resolvable) (used to uniquely identify each VM running on a machine in Chainsaw).
3: Tabbed pane support - a tabbed pane for each unique machinename/app combination. I
thought about allowing the user to pick which fields are used to build the unique
tabbed panes, but I'm not sure how useful it would be. I could see using the NDC or
MDC on separate tabbed panes in some situations.
4: Jakarta RegExp used to build display and colorizing filters. The DisplayFilter
associates columns with regular expressions. If the value in that column passes the
regexp, then the row is added to the display. ColorFilters work the same way except
they map columns and regular expressions to a Color. For example,
colorFilter.addFilter("Level", "WARN|INFO", Color.RED) will do the obvious. If a
DisplayFilter exists, the row must pass at least one filter to be displayed. If there
are no display filters, all rows pass.
5: Ascending/descending column sort with up/down icons - I have gained approval from
Claude Duguay to place his JTable sorting code (see
http://www.fawcette.com/javapro/2002_08/magazine/columns/visualcomponents/) under the
Apache License for use in Log4j. He would like recognition somewhere and a note in
the code saying this code has been placed under the Apache license with his explicit
permission. Finally, great JSortTable functionality and cool up/down arrows!
6: Handy multi-line tooltip text - see Logger/Msg/Level/Exception information as you
move the mouse over the table's rows - no more scrolling to the right to read the
exception!
7: A right mouse button popup menu with 'clear log' (per tabbed pane) and toggle
on/off of the multi-line tooltip (it is a little slower to update the tooltip over
each row).
8. Updated log4j.dtd and LoggingEvent to support properties/mdc.
I've made the changes with JDK1.4 and I think I've taken advantage of some of JDK1.4's
functionality - but making it work on 1.3 shouldn't be difficult.
I haven't looked at Log4J 1.3's receivers yet but hopefully my UDPReceiver will fit
nicely.
Still to do:
1. Save all settings to property file, including defined color/display filters, window
position, column widths/maybe column order
2. Build a colorizer/display filter UI. The API is complete and it works, I just
haven't thought out an intuitive UI for filter creation yet. Any UI suggestions, let
me know.
3. Possibly provide a way to configure which fields are displayed in the multi-line
tooltip.
Still a lot of work to do to get it ready for inclusion (I think we should move the
XML externalization of LoggingEvent out of the Chainsaw package), maybe other
appenders want to use it as well.
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]