logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r829704 - /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java
Date Mon, 26 Oct 2009 05:25:40 GMT
Author: sdeboy
Date: Mon Oct 26 05:25:39 2009
New Revision: 829704

URL: http://svn.apache.org/viewvc?rev=829704&view=rev
Log:
If marker field is edited and cleared, remove the property

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

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java?rev=829704&r1=829703&r2=829704&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/ChainsawCyclicBufferTableModel.java
Mon Oct 26 05:25:39 2009
@@ -639,7 +639,12 @@
         String columnName = getColumnName(columnIndex);
         if (columnName.toLowerCase().equals(ChainsawConstants.MARKER_PROPERTY_NAME)) {
             LoggingEvent event = getRow(rowIndex);
-            event.setProperty(ChainsawConstants.MARKER_PROPERTY_NAME, value.toString());
+            //if the entry is cleared, remove the property
+            if (value != null && !value.toString().trim().equals("")) {
+                event.setProperty(ChainsawConstants.MARKER_PROPERTY_NAME, value.toString());
+            } else {
+                event.removeProperty(ChainsawConstants.MARKER_PROPERTY_NAME);
+            }
         }
     }
 



Mime
View raw message