logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r926957 - in /logging/chainsaw/trunk/src/main: java/org/apache/log4j/chainsaw/ java/org/apache/log4j/chainsaw/layout/ resources/org/apache/log4j/chainsaw/help/ resources/org/apache/log4j/chainsaw/layout/
Date Wed, 24 Mar 2010 07:25:04 GMT
Author: sdeboy
Date: Wed Mar 24 07:25:04 2010
New Revision: 926957

URL: http://svn.apache.org/viewvc?rev=926957&view=rev
Log:
Changed 'default' detail panel layout to hide some fields, added 'full' detail panel layout
which includes all default fields

Added:
    logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/layout/FullDetailLayout.html
      - copied unchanged from r922772, logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/layout/DefaultDetailLayout.html
Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/layout/DefaultLayoutFactory.java
    logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/help/release-notes.html
    logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/layout/DefaultDetailLayout.html

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=926957&r1=926956&r2=926957&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 Wed Mar 24
07:25:04 2010
@@ -1212,8 +1212,21 @@ public class LogPanel extends DockablePa
               DefaultLayoutFactory.getDefaultPatternLayout());
           }
         });
+
+        JRadioButtonMenuItem fullLayoutRadio =
+          new JRadioButtonMenuItem(
+            new AbstractAction("Set to Full Layout") {
+              public void actionPerformed(ActionEvent e) {
+                setDetailPaneConversionPattern(
+                  DefaultLayoutFactory.getFullPatternLayout());
+              }
+            });
+
     editDetailPopupMenu.add(defaultLayoutRadio);
+    editDetailPopupMenu.add(fullLayoutRadio);
+
     layoutGroup.add(defaultLayoutRadio);
+    layoutGroup.add(fullLayoutRadio);
     defaultLayoutRadio.setSelected(true);
 
     JRadioButtonMenuItem tccLayoutRadio =

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/layout/DefaultLayoutFactory.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/layout/DefaultLayoutFactory.java?rev=926957&r1=926956&r2=926957&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/layout/DefaultLayoutFactory.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/layout/DefaultLayoutFactory.java
Wed Mar 24 07:25:04 2010
@@ -37,11 +37,16 @@ public class DefaultLayoutFactory {
   }
 
   public static String getDefaultPatternLayout() {
-    if (defaultPatternLayout == null) {
+      return getPatternLayout("org/apache/log4j/chainsaw/layout/DefaultDetailLayout.html");
+  }
+  public static String getFullPatternLayout() {
+      return getPatternLayout("org/apache/log4j/chainsaw/layout/FullDetailLayout.html");
+  }
+
+  private static String getPatternLayout(String fileNamePath) {
       StringBuffer content = new StringBuffer();
       URL defaultLayoutURL =
-        DefaultLayoutFactory.class.getClassLoader().getResource(
-          "org/apache/log4j/chainsaw/layout/DefaultDetailLayout.html");
+        DefaultLayoutFactory.class.getClassLoader().getResource(fileNamePath);
 
       if (defaultLayoutURL == null) {
         LogManager.getLogger(DefaultLayoutFactory.class).warn(
@@ -71,7 +76,6 @@ public class DefaultLayoutFactory {
 
         defaultPatternLayout = content.toString();
       }
-    }
 
     return defaultPatternLayout;
   }

Modified: logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/help/release-notes.html
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/help/release-notes.html?rev=926957&r1=926956&r2=926957&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/help/release-notes.html
(original)
+++ logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/help/release-notes.html
Wed Mar 24 07:25:04 2010
@@ -19,7 +19,7 @@
 Event details context menu (right click) now has 'set refine focus' and 'find next' menu
items that will update the refine focus/find next fields with the selected text (building
a 'msg ~= SELECTEDTEXT' expression)
 </li>
 <li>
-Details panel entry no longer refreshes even when selection hasn't changed (the contents
of the detail pane were being updated, preventing text selection)
+Changed 'default' detail pane layout to hide some fields, added 'full' detail pane layout
which includes all default fields
 </li>
 </ul>
 <h2>20 Mar 2010</h2>

Modified: logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/layout/DefaultDetailLayout.html
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/layout/DefaultDetailLayout.html?rev=926957&r1=926956&r2=926957&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/layout/DefaultDetailLayout.html
(original)
+++ logging/chainsaw/trunk/src/main/resources/org/apache/log4j/chainsaw/layout/DefaultDetailLayout.html
Wed Mar 24 07:25:04 2010
@@ -3,12 +3,6 @@
 <TR><TD><B>Logger</B><TD>%c</td></tr>
 <TR><TD><B>Time</B><TD>%d</td></tr>
 <TR><TD><B>Thread</B><TD>%t</td></tr>
-<TR><TD><B>Message</B><TD><pre>%m</pre></td></tr>
-<TR><TD><B>NDC</B><TD>%x</td></tr>
-<TR><TD><B>Class</B><TD>%C</td></tr>
-<TR><TD><B>Method</B><TD>%M</td></tr>
-<TR><TD><B>Line</B><TD>%L</td></tr>
-<TR><TD><B>File</B><TD>%F</td></tr>
-<TR><TD><B>Properties</B><TD>%properties</td></tr>
+<TR><TD><B>Message</B><TD>%m</td></tr>
 <TR><TD><B>Throwable</B><TD><pre>%throwable</pre></td></tr>
 </table></body></html>
\ No newline at end of file



Mime
View raw message