logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r646432 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: LogUI.java receivers/ReceiversPanel.java
Date Wed, 09 Apr 2008 16:36:41 GMT
Author: sdeboy
Date: Wed Apr  9 09:36:38 2008
New Revision: 646432

URL: http://svn.apache.org/viewvc?rev=646432&view=rev
Log:
- Fix minor bug in receiversPanel
- Update activateViewer(ChainsaAppender) method to support starting Chainsaw via the ChainsawAppender

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/receivers/ReceiversPanel.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java?rev=646432&r1=646431&r2=646432&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java Wed Apr  9 09:36:38
2008
@@ -403,8 +403,20 @@
    *
    */
   public void activateViewer(ChainsawAppender appender) {
+
+    if(OSXIntegration.IS_OSX) {
+        System.setProperty("apple.laf.useScreenMenuBar", "true");
+    }
+    
+    LogManager.setRepositorySelector(new RepositorySelector() {
+
+      public LoggerRepository getLoggerRepository() {
+          return repositoryExImpl;
+      }}, repositorySelectorGuard);
+
     //if Chainsaw is launched as an appender, ensure the root logger level is TRACE
     LogManager.getRootLogger().setLevel(Level.TRACE);
+
     ApplicationPreferenceModel model = new ApplicationPreferenceModel();
     SettingsManager.getInstance().configure(new ApplicationPreferenceModelSaver(model));
 
@@ -422,9 +434,17 @@
           }
         });
     
-    activateViewer();
+    applicationPreferenceModel = new ApplicationPreferenceModel();
+
+    SettingsManager.getInstance().configure(new ApplicationPreferenceModelSaver(model));
+
+    applyLookAndFeel(model.getLookAndFeelClassName());
+
+    createChainsawGUI(model, null);
 
     getApplicationPreferenceModel().apply(model);
+
+    activateViewer();
   }
 
   /**
@@ -457,6 +477,7 @@
             
             Thread thread = new Thread(new Runnable() {
 
+            	
                 public void run() {
                     logger.debug("Loading files: " + fileList);
                     for (Iterator iter = fileList.iterator(); iter.hasNext();) {
@@ -479,9 +500,10 @@
             thread.start();
             
         }});
-   
-    addDragDropPanel();
+
+	addDragDropPanel();
     applicationPreferenceModelPanel = new ApplicationPreferenceModelPanel(applicationPreferenceModel);
+
     applicationPreferenceModelPanel.setOkCancelActionListener(
       new ActionListener() {
         public void actionPerformed(ActionEvent e) {

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/receivers/ReceiversPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/receivers/ReceiversPanel.java?rev=646432&r1=646431&r2=646432&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/receivers/ReceiversPanel.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/receivers/ReceiversPanel.java
Wed Apr  9 09:36:38 2008
@@ -409,7 +409,7 @@
     /**
      * add this listener to all SocketReceivers
      */
-    if (pluginRegistry == null) {
+    if (pluginRegistry != null) {
     	List socketReceivers =
       		pluginRegistry.getPlugins(SocketReceiver.class);
 



Mime
View raw message