You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Max Rydahl Andersen <ma...@eos.dk> on 2002/05/10 18:42:52 UTC
LF5 Filter patch
Hello log4j-user,
Here is my first shot of a patch for enabling more "accessible"
filtering in LF5.
What it does:
The patch makes it possible to filter on message, ndc, thread and
category by simply entering the filter in the added "control panel"
in the left corner. (very much like the functionallity in Chainsaw)
What I have added:
DefaultLogRecordFilter - A class that contains the text string for
performing the match.
FilterPanel - A panel which enable you to enter the filters.
What I have removed:
The Sort by NDC menuitem. It overlapped with the functionallity
provided in this patch.
What I have changed:
The filter on the FilteredTableModel was always changed/reset
whenever LF5 activated/deactivated the filtering for NDC - thus it
was rather cumbersome to have a single point of entry for changing
the active filter. This was altered so LogBrokerMonitor keeps a
reference to the DefaultLogRecordFilter that it uses in the
tablemodel. This reference is then passed on to to the relevant
parts of the application, thus the filter is reused instead of
recreated/destroyed for each change. I might suggest extending the
filter mechanism to a chain of filters instead of the
"mono"-filtering there is now - but hey, it works now :)
Other stuff:
The requirement of having af lf5.properties file has been removed,
as it is not included in the lf5 directory and it did not seem to have any function.
TODO:
- make it possible to save the filters.
- filter on throwable and location text also.
Note: the possibility for saving the NDC text in LF5 configuration
is kept as is and will still be saved/loaded.
Things that I noticed:
The code in Chainsaw and LF5 look VERY much alike, just with
different names :)
The performance of LF5 is not optimal when one enable and disables
categories in the CategoryExplorerTree (not compared to Lumbermill)
...and more - but I do not have the time right now to tell...so try
this patch and tell me what you think :)
--
Best regards,
Max
ACURE, Software Engineer
mailto:max@eos.dk
WHO'S AT JAOO? - http://www.jaoo.dk
-----------------------------------------------------------------------
ACURE, Margrethepladsen 3, 8000 �rhus C, Denmark
Tel: +45 8732 8787 / Fax: +45 8732 8788 / Mob: +45 4072 8483