logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From psm...@apache.org
Subject svn commit: r350110 - in /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw: ApplicationPreferenceModel.java ApplicationPreferenceModelSaver.java LogUI.java
Date Thu, 01 Dec 2005 02:43:09 GMT
Author: psmith
Date: Wed Nov 30 18:43:03 2005
New Revision: 350110

URL: http://svn.apache.org/viewcvs?rev=350110&view=rev
Log:
Fixed up some bugs.  The previous preference model changes meant
that, err, no logs ended up being displayed, because the 
worker thread never got a valid expression to filter into tabs.

Hmmm. silly me.

Modified:
    logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
    logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java
    logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java

Modified: logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
URL: http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java?rev=350110&r1=350109&r2=350110&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
Wed Nov 30 18:43:03 2005
@@ -44,7 +44,7 @@
     private String lastUsedVersion = "";
     private int responsiveness = 3;
     
-    private String identifierExpression = Constants.HOSTNAME_KEY + " - " + Constants.APPLICATION_KEY;

+    private String identifierExpression = "PROP.hostname - PROP.application"; 
 
     private transient final PropertyChangeSupport propertySupport =
         new PropertyChangeSupport(this);

Modified: logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java
URL: http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java?rev=350110&r1=350109&r2=350110&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java
Wed Nov 30 18:43:03 2005
@@ -40,10 +40,13 @@
         XStream stream = new XStream(new DomDriver());
         try {
             File file = getApplicationPreferenceXMLFile(SettingsManager.getInstance().getSettingsDirectory());
-            FileReader reader = new FileReader(file);
-            ApplicationPreferenceModel loadedModel = (ApplicationPreferenceModel) stream.fromXML(reader);
-            model.apply(loadedModel);
-            reader.close();
+            if (file.exists()) {
+                FileReader reader = new FileReader(file);
+                ApplicationPreferenceModel loadedModel = (ApplicationPreferenceModel) stream
+                        .fromXML(reader);
+                model.apply(loadedModel);
+                reader.close();
+            }
         } catch (Exception e) {
 //            TODO exception handling
             e.printStackTrace();

Modified: logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java
URL: http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java?rev=350110&r1=350109&r2=350110&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java (original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java Wed Nov 30 18:43:03
2005
@@ -1148,6 +1148,8 @@
           handler.setIdentifierExpression(evt.getNewValue().toString());
         }
       });
+    handler.setIdentifierExpression(applicationPreferenceModel.getIdentifierExpression());
+    
 
     applicationPreferenceModel.addPropertyChangeListener(
       "toolTipDisplayMillis",
@@ -1168,6 +1170,7 @@
           handler.setQueueInterval((value * 1000) - 750);
         }
       });
+    handler.setQueueInterval((applicationPreferenceModel.getResponsiveness() * 1000) - 750);
 
     applicationPreferenceModel.addPropertyChangeListener(
       "tabPlacement",
@@ -1201,7 +1204,8 @@
           setStatusBarVisible(value);
         }
       });
-
+    setStatusBarVisible(applicationPreferenceModel.isStatusBar());
+    
     applicationPreferenceModel.addPropertyChangeListener(
       "receivers",
       new PropertyChangeListener() {
@@ -1215,7 +1219,13 @@
           }
         }
       });
+//    if (applicationPreferenceModel.isReceivers()) {
+//      showReceiverPanel();
+//    } else {
+//      hideReceiverPanel();
+//    }
 
+    
     applicationPreferenceModel.addPropertyChangeListener(
       "toolbar",
       new PropertyChangeListener() {
@@ -1226,7 +1236,6 @@
       });
     toolbar.setVisible(applicationPreferenceModel.isToolbar());
 
-    setStatusBarVisible(applicationPreferenceModel.isStatusBar());
   }
 
   /**



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


Mime
View raw message