logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r944149 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: LogPanel.java LoggerNameTreePanel.java
Date Fri, 14 May 2010 07:54:12 GMT
Author: sdeboy
Date: Fri May 14 07:54:12 2010
New Revision: 944149

URL: http://svn.apache.org/viewvc?rev=944149&view=rev
Log:
Replace logger match expression regexps with partial text matches (faster and will work fine)
Updated the unit increment to be twice the default row height

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java?rev=944149&r1=944148&r2=944149&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java Fri May 14
07:54:12 2010
@@ -1123,7 +1123,7 @@ public class LogPanel extends DockablePa
     JPanel eventsAndStatusPanel = new JPanel(new BorderLayout());
 
     eventsPane = new JScrollPane(table);
-    eventsPane.getVerticalScrollBar().setUnitIncrement(table.getRowHeight());
+    eventsPane.getVerticalScrollBar().setUnitIncrement(ChainsawConstants.DEFAULT_ROW_HEIGHT
* 2);
 
     eventsAndStatusPanel.add(eventsPane, BorderLayout.CENTER);
     JPanel rightPanel = new JPanel();
@@ -1452,15 +1452,11 @@ public class LogPanel extends DockablePa
               if (comp instanceof JLabel) {
                 value = ((JLabel) comp).getText();
               }
-            } else if (colName.equalsIgnoreCase(ChainsawConstants.LOGGER_COL_NAME)) {
-                operator = "like";
-                value = "^" + table.getValueAt(row, column).toString() + ".*";
             } else {
               Object o = table.getValueAt(row, column).toString();
 
               if (o instanceof String[] && ((String[])o).length > 0) {
                 value = ((String[]) o)[0];
-                operator = "~=";
               } else {
                 value = o.toString();
               }
@@ -1527,16 +1523,12 @@ public class LogPanel extends DockablePa
 
             if (colName.equalsIgnoreCase(ChainsawConstants.TIMESTAMP_COL_NAME)) {
             	value = timestampExpressionFormat.format(new Date(table.getValueAt(row, column).toString()));
-            } else if (colName.equalsIgnoreCase(ChainsawConstants.LOGGER_COL_NAME)) {
-                operator = "like";
-                value = "^" + table.getValueAt(row, column).toString() + ".*";
             } else {
               Object o = table.getValueAt(row, column);
 
               if (o != null) {
                 if (o instanceof String[] && ((String[])o).length > 0) {
                   value = ((String[]) o)[0];
-                  operator = "~=";
                 } else {
                   value = o.toString();
                 }

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java?rev=944149&r1=944148&r2=944149&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java
Fri May 14 07:54:12 2010
@@ -831,7 +831,7 @@ final class LoggerNameTreePanel extends 
           return;
         }
         String currentFilterText = logPanel.getRefineFocusText();
-        logPanel.setRefineFocusText(currentFilterText + " || logger like '^" + selectedLogger
+ ".*'");
+        logPanel.setRefineFocusText(currentFilterText + " || logger ~= " + selectedLogger);
     }
 
     private void setRefineFocusUsingCurrentlySelectedNode()
@@ -843,7 +843,7 @@ final class LoggerNameTreePanel extends 
         {
           return;
         }
-        logPanel.setRefineFocusText("logger like '^" + selectedLogger + ".*'");
+        logPanel.setRefineFocusText("logger ~= " + selectedLogger);
     }
 
     private Action createDefineColorRuleForLoggerAction() {



Mime
View raw message