logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject cvs commit: logging-log4j/src/java/org/apache/log4j/chainsaw/help tutorial.html
Date Sat, 01 May 2004 09:18:49 GMT
sdeboy      2004/05/01 02:18:48

  Modified:    src/java/org/apache/log4j/chainsaw/receivers
                        ReceiversPanel.java
               src/java/org/apache/log4j/chainsaw LogPanel.java LogUI.java
                        ChainsawToolBarAndMenus.java
                        LoggerNameTreePanel.java
               src/java/org/apache/log4j/chainsaw/help tutorial.html
  Log:
  - removed one touch selectable feature from split panes and modified hide/show behavior
to work more consistently
  - updated tutorial docs on expressions, display and color filters
  - removed extra borders where possible
  
  PR:
  Obtained from:
  Submitted by:	
  Reviewed by:	
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.13      +0 -2      logging-log4j/src/java/org/apache/log4j/chainsaw/receivers/ReceiversPanel.java
  
  Index: ReceiversPanel.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/receivers/ReceiversPanel.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ReceiversPanel.java	28 Mar 2004 10:04:30 -0000	1.12
  +++ ReceiversPanel.java	1 May 2004 09:18:48 -0000	1.13
  @@ -102,7 +102,6 @@
   
     public ReceiversPanel() {
       super(new BorderLayout());
  -    setBorder(BorderFactory.createEtchedBorder());
   
       final ReceiversTreeModel model = new ReceiversTreeModel();
       PluginRegistry.addPluginListener(model);
  @@ -297,7 +296,6 @@
         "Ensures that any Receiver that isn't active, is started.");
   
       receiversTree.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
  -
       receiversTree.setCellRenderer(new ReceiverTreeCellRenderer());
   
       buttonPanel = new ReceiverToolbar();
  
  
  
  1.67      +22 -41    logging-log4j/src/java/org/apache/log4j/chainsaw/LogPanel.java
  
  Index: LogPanel.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/LogPanel.java,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- LogPanel.java	15 Apr 2004 04:54:48 -0000	1.66
  +++ LogPanel.java	1 May 2004 09:18:48 -0000	1.67
  @@ -199,7 +199,6 @@
     private final JSplitPane lowerPanel;
     private final DetailPaneUpdater detailPaneUpdater;
     private final JPanel detailPanel = new JPanel(new BorderLayout());
  -  private final int dividerSize;
     private final JSplitPane nameTreeAndMainPanelSplit;
     private final LoggerNameTreePanel logTreePanel;
     private final LogPanelPreferenceModel preferenceModel =
  @@ -210,9 +209,7 @@
     private final RuleColorizer colorizer = new RuleColorizer();
     private final RuleMediator ruleMediator = new RuleMediator();
     private Layout detailLayout = new EventDetailLayout();
  -  private int previousDetailPanelSplitLocation;
     private double lastDetailPanelSplitLocation = DEFAULT_DETAIL_SPLIT_LOCATION;
  -  private int previousLogTreePanelSplitLocation;
     private double lastLogTreePanelSplitLocation =
       DEFAULT_LOG_TREE_SPLIT_LOCATION;
     private boolean bypassScroll;
  @@ -222,6 +219,7 @@
     private Rule findRule;
     private final JPanel findPanel;
     private JTextField findField;
  +  private int dividerSize;
   
     /**
      * Creates a new LogPanel object.  If a LogPanel with this identifier has
  @@ -938,9 +936,9 @@
         new JSplitPane(
           JSplitPane.VERTICAL_SPLIT, eventsAndStatusPanel, detailPanel);
   
  -    lowerPanel.setDividerLocation(lastDetailPanelSplitLocation);
  -    lowerPanel.setOneTouchExpandable(true);
  -    dividerSize = lowerPanel.getDividerSize() + 5;
  +    dividerSize = lowerPanel.getDividerSize();
  +    lowerPanel.setDividerLocation(-1);
  +
       lowerPanel.setResizeWeight(1.0);
       lowerPanel.setBorder(null);
       lowerPanel.setContinuousLayout(true);
  @@ -950,7 +948,7 @@
       } else {
         hideDetailPane();
       }
  -
  +    
       /*
        * Detail panel layout editor
        */
  @@ -1061,15 +1059,18 @@
       /*
        * Logger tree splitpane definition
        */
  -    nameTreeAndMainPanelSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
  -    nameTreeAndMainPanelSplit.add(logTreePanel);
  -    nameTreeAndMainPanelSplit.add(lowerPanel);
  +    nameTreeAndMainPanelSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, logTreePanel,
lowerPanel);
  +    
       nameTreeAndMainPanelSplit.setToolTipText("Still under development....");
       nameTreeAndMainPanelSplit.setDividerLocation(-1);
   
       add(nameTreeAndMainPanelSplit, BorderLayout.CENTER);
  -    nameTreeAndMainPanelSplit.setOneTouchExpandable(true);
  -    logTreePanel.setVisible(isLogTreeVisible());
  +
  +    if (isLogTreeVisible()) {
  +        showLogTreePanel();
  +    } else {
  +        hideLogTreePanel();
  +    }
   
       /*
        * Other menu items
  @@ -1580,32 +1581,24 @@
     private void showDetailPane() {
       lowerPanel.setDividerSize(dividerSize);
       lowerPanel.setDividerLocation(lastDetailPanelSplitLocation);
  -    lowerPanel.setLastDividerLocation(previousDetailPanelSplitLocation);
       detailPanel.setVisible(true);
  +    lowerPanel.repaint();
     }
   
     /**
      * Hide the detail pane, holding the current divider location for later use
      */
     private void hideDetailPane() {
  -    int currentSize = lowerPanel.getHeight() - dividerSize;
  +    int currentSize = lowerPanel.getHeight() - lowerPanel.getDividerSize();
   
       if (currentSize > 0) {
         lastDetailPanelSplitLocation =
           (double) lowerPanel.getDividerLocation() / currentSize;
  -
  -      //if hiding when details are minimized or maximized, use last location
  -      if (
  -        (lastDetailPanelSplitLocation == 1.0)
  -          || (lastDetailPanelSplitLocation == 0.0)) {
  -        previousDetailPanelSplitLocation = lowerPanel.getLastDividerLocation();
  -
  -        lowerPanel.setLastDividerLocation(lowerPanel.getLastDividerLocation());
  -      }
  -    }
  +     }
   
       lowerPanel.setDividerSize(0);
       detailPanel.setVisible(false);
  +    lowerPanel.repaint();
     }
   
     /**
  @@ -1615,9 +1608,8 @@
       nameTreeAndMainPanelSplit.setDividerSize(dividerSize);
       nameTreeAndMainPanelSplit.setDividerLocation(
         lastLogTreePanelSplitLocation);
  -    nameTreeAndMainPanelSplit.setLastDividerLocation(
  -      previousLogTreePanelSplitLocation);
       logTreePanel.setVisible(true);
  +    nameTreeAndMainPanelSplit.repaint();
     }
   
     /**
  @@ -1625,26 +1617,15 @@
      */
     private void hideLogTreePanel() {
       //subtract one to make sizes match
  -    int currentSize = nameTreeAndMainPanelSplit.getWidth() - dividerSize - 1;
  +    int currentSize = nameTreeAndMainPanelSplit.getWidth() - nameTreeAndMainPanelSplit.getDividerSize()
- 1;
   
       if (currentSize > 0) {
         lastLogTreePanelSplitLocation =
           (double) nameTreeAndMainPanelSplit.getDividerLocation() / currentSize;
  -
  -      //if hiding when log tree is minimized or maximized, use last location
  -      if (
  -        (lastLogTreePanelSplitLocation == 1.0)
  -          || (lastLogTreePanelSplitLocation == 0.0)) {
  -        previousLogTreePanelSplitLocation =
  -          nameTreeAndMainPanelSplit.getLastDividerLocation();
  -
  -        nameTreeAndMainPanelSplit.setLastDividerLocation(
  -          nameTreeAndMainPanelSplit.getLastDividerLocation());
  -      }
       }
  -
       nameTreeAndMainPanelSplit.setDividerSize(0);
       logTreePanel.setVisible(false);
  +    nameTreeAndMainPanelSplit.repaint();
     }
   
     /**
  @@ -1801,8 +1782,8 @@
         KeyStroke.getKeyStroke(KeyEvent.VK_F3, KeyEvent.SHIFT_MASK),
         undockedFindPreviousAction.getValue(Action.NAME));
   
  -    Dimension findSize = new Dimension(132, 24);
  -    Dimension findPanelSize = new Dimension(144, 26);
  +    Dimension findSize = new Dimension(132, 28);
  +    Dimension findPanelSize = new Dimension(144, 28);
       findPanel.setPreferredSize(findPanelSize);
       findPanel.setMaximumSize(findPanelSize);
       findPanel.setMinimumSize(findPanelSize);
  
  
  
  1.86      +13 -29    logging-log4j/src/java/org/apache/log4j/chainsaw/LogUI.java
  
  Index: LogUI.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/LogUI.java,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- LogUI.java	20 Apr 2004 09:53:57 -0000	1.85
  +++ LogUI.java	1 May 2004 09:18:48 -0000	1.86
  @@ -154,11 +154,10 @@
     private final SettingsManager sm = SettingsManager.getInstance();
     private final JFrame tutorialFrame = new JFrame("Chainsaw Tutorial");
     private JSplitPane mainReceiverSplitPane;
  -  private int previousMainReceiverSplitLocation;
     private double lastMainReceiverSplitLocation =
       DEFAULT_MAIN_RECEIVER_SPLIT_LOCATION;
  -  private int dividerSize;
     private final List identifierPanels = new ArrayList();
  +  private int dividerSize;
   
     /**
      * Set to true, if and only if the GUI has completed it's full
  @@ -641,17 +640,12 @@
       getContentPane().add(toolbar, BorderLayout.NORTH);
       getContentPane().add(statusBar, BorderLayout.SOUTH);
   
  -    mainReceiverSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
  -    mainReceiverSplitPane.add(panePanel);
  -    mainReceiverSplitPane.add(receiversPanel);
  -    mainReceiverSplitPane.setDividerLocation(-1);
  -
  -    dividerSize = mainReceiverSplitPane.getDividerSize() + 5;
  +    mainReceiverSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panePanel, receiversPanel);
  +    dividerSize = mainReceiverSplitPane.getDividerSize();
       mainReceiverSplitPane.setDividerLocation(-1);
   
       getContentPane().add(mainReceiverSplitPane, BorderLayout.CENTER);
   
  -    mainReceiverSplitPane.setOneTouchExpandable(true);
       mainReceiverSplitPane.setResizeWeight(1.0);
       addWindowListener(
         new WindowAdapter() {
  @@ -781,8 +775,7 @@
       if (applicationPreferenceModel.isReceivers()) {
         showReceiverPanel();
       } else {
  -      mainReceiverSplitPane.setDividerSize(0);
  -      receiversPanel.setVisible(false);
  +      hideReceiverPanel();
       }
   
       removeSplash();
  @@ -932,9 +925,8 @@
     private void showReceiverPanel() {
       mainReceiverSplitPane.setDividerSize(dividerSize);
       mainReceiverSplitPane.setDividerLocation(lastMainReceiverSplitLocation);
  -    mainReceiverSplitPane.setLastDividerLocation(
  -      previousMainReceiverSplitLocation);
       receiversPanel.setVisible(true);
  +    mainReceiverSplitPane.repaint();
     }
   
     /**
  @@ -942,25 +934,17 @@
      */
     private void hideReceiverPanel() {
       //subtract one to make sizes match
  -    int currentSize = mainReceiverSplitPane.getWidth() - dividerSize;
  -
  -    if (currentSize > 0) {
  -      if (
  -        ((mainReceiverSplitPane.getDividerLocation() + 1) == currentSize)
  -          || ((mainReceiverSplitPane.getDividerLocation() - 1) == 0)) {
  -        //if hiding when receiver is minimized or maximized, use last location
  -        previousMainReceiverSplitLocation =
  -          mainReceiverSplitPane.getLastDividerLocation();
  -        mainReceiverSplitPane.setLastDividerLocation(
  -          mainReceiverSplitPane.getLastDividerLocation());
  -      } else {
  -        lastMainReceiverSplitLocation = ((double) mainReceiverSplitPane
  -          .getDividerLocation() / currentSize);
  -      }
  +    int currentSize = mainReceiverSplitPane.getWidth() - mainReceiverSplitPane.getDividerSize();
  +    if (mainReceiverSplitPane.getDividerLocation() > -1) {
  +        if (!(((mainReceiverSplitPane.getDividerLocation() + 1) == currentSize)
  +                || ((mainReceiverSplitPane.getDividerLocation() - 1) == 0))) {
  +                    lastMainReceiverSplitLocation = ((double) mainReceiverSplitPane
  +                        .getDividerLocation() / currentSize);
  +        }
       }
  -
       mainReceiverSplitPane.setDividerSize(0);
       receiversPanel.setVisible(false);
  +    mainReceiverSplitPane.repaint();
     }
   
     private void initSocketConnectionListener() {
  
  
  
  1.40      +2 -2      logging-log4j/src/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java
  
  Index: ChainsawToolBarAndMenus.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- ChainsawToolBarAndMenus.java	5 Apr 2004 07:22:12 -0000	1.39
  +++ ChainsawToolBarAndMenus.java	1 May 2004 09:18:48 -0000	1.40
  @@ -132,8 +132,8 @@
   
       findPanel = new JPanel();
   
  -    Dimension findSize = new Dimension(132, 24);
  -    Dimension findPanelSize = new Dimension(144, 26);
  +    Dimension findSize = new Dimension(132, 28);
  +    Dimension findPanelSize = new Dimension(144, 28);
       findPanel.setPreferredSize(findPanelSize);
       findPanel.setMaximumSize(findPanelSize);
       findPanel.setMinimumSize(findPanelSize);
  
  
  
  1.27      +1 -2      logging-log4j/src/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java
  
  Index: LoggerNameTreePanel.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/LoggerNameTreePanel.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- LoggerNameTreePanel.java	28 Mar 2004 10:04:30 -0000	1.26
  +++ LoggerNameTreePanel.java	1 May 2004 09:18:48 -0000	1.27
  @@ -149,7 +149,6 @@
       this.preferenceModel = preferenceModel;
   
       setLayout(new BorderLayout());
  -    setBorder(BorderFactory.createEtchedBorder());
   
       logTree =
       new JTree(logTreeModel)
  
  
  
  1.7       +63 -51    logging-log4j/src/java/org/apache/log4j/chainsaw/help/tutorial.html
  
  Index: tutorial.html
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/help/tutorial.html,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- tutorial.html	13 Apr 2004 07:24:43 -0000	1.6
  +++ tutorial.html	1 May 2004 09:18:48 -0000	1.7
  @@ -5,9 +5,9 @@
   </HEAD>
   
   <BODY>
  +<p><a href="#expressions">Expressions</a>
   <p><a href="#color_filter">Color filters</a>
   <p><a href="#display_filter">Display filters</a>
  -<p><a href="#expressions">Expressions</a>
   
   <p>Welcome to the Chainsaw v2 Tutorial.  Here you will learn how to effectively utilise
the many features of Chainsaw.</p>
   </p>
  @@ -107,52 +107,29 @@
   <h3>Logger Tree panel</h3>
   <font color="red"><b>TODO</b></font>
   <p>
  -<A NAME="color_filter"><h3>Color filter</h3>
  -Each log panel can define color rules which can be used to colorize events in the event
panel.  Color rules are associated with each event panel and are saved when the application
ends and loaded automatically when the application starts.
  -
  -<p><b>Define color rules:</b>
  -<ol>
  -<li>Open the color filter panel by selecting the menu item 'current tab-log panel
color filter', or by using the context (right-click mouse) menu in the events panel and selecting
'log panel color filter'</li>
  -<li>Select 'new' to add a row</li>
  -<li>Double-click on the 'expression' column</li>
  -<li>Enter an expression (see <a href="#expressions">Expressions</a> section
below)</li>
  -<li>Select a color from the list or use the 'browse' button at the bottom of the
color list to define a custom color</li>
  -<li>Repeat steps 2 - 5 as needed</li>
  -<li>Order the rules - events are evaluated against color rules in order.  Select
a color rule entry and press the UP or DOWN icons on the panel as needed</li>
  -<li>Apply the rules.  The event panel will be updated based on the defined color
rules</li>
  -<li>If there are invalid expressions, a message at the bottom will direct you to
hover the mouse over an expression to see the error as the entry's tooltip</li>
  -<li>Fix errors as needed, apply and close the panel</li>
  -</ol>
  -
  -<A NAME="display_filter"><h3>Display filter (refine focus)</h3>
  -Events displayed in the event panel can be filtered one of two ways: by focusing on a logger
in the logger tree panel or by defining display filter rules in the 'refine focus' field.
 <b>NOTE:</b>Display filter rules are not saved. 
  -<p><b>Define display rules:</b>
  -<ol>
  -<li>Move the cursor to the 'refine focus on' field</li>
  -<li>Enter an expression (see <a href="#expressions">Expressions</a> section
below)</li>
  -<li>Alternatively, use the context (mouse right click) menu available from the table
of events to either set the refine focus expression or augment the existing refine focus expression
based on the current mouse location.  For example, if the mouse pointer is in the LEVEL cell
of an event which has a value of INFO, selecting <b>set 'refine focus' field</b>
will assign the expression <b>LEVEL == 'INFO'</b> to the refine focus field.</li>
  -<li>The display will be updated automatically if the expression is valid once the
application sees you are not changing the expression (1 second delay)</li>
  -<li>If the expression is invalid (the list of events in the event panel doesn't change),
information describing the error is available as the 'refine focus on' field's tooltip</li>
  -<li>If the <b>ENTER</b> key is pressed when a valid expression is in
the 'refine focus on' field, the expression is added to the refine focus drop down list and
can be recalled later in the session (display filter rules are not saved)</li>
  -</ol>
   
   <A NAME="expressions"><h3>Expressions</h3>
  -<p>Expressions provide a flexible way of building display and color rules.  All of
the logging event's fields are available for evaluation, as well as a variety of operators.
  +Expressions are used to define color and display rules in Chainsaw.  An expression is a
textual representation of a rule, and provides the ability to perform queries against a collection
of logging events.  As each logging event is examined by the rule, if the event passes the
rule's evaluation, the operation associated with the rule is performed (for example, the event
may be assigned a color or added to the display).  Log4J's rule expression syntax provides
access to all of the logging event's fields, a number of operators, and the ability to control
precedence.
  +
  +<p><b>Expression requirements:</b></p>
   <ul>
  -<li>Multiple expressions can be evaluated together by using logical operators, and
precedence can be controlled by using parentheses</li>
  -<li>Operands and operators must be separated by spaces</li>
  +<li>Precedence can be controlled by applying parentheses to groups of expressions
(usually used in combination with logical operators)</li>
  +<li>All operators, operands and parentheses must be separated by spaces</li>
   <li>Single tick marks can be used to delimit multi-word operands, for example: <b>msg
~= 'my msg'</b></li>
  -<li>Parentheses can be used to group expressions (remember to put spaces around the
parens)</li>
  -<li><b>NOTE:</b> A context menu is available (via right-mouse click or
ctrl-space) to assist in constructing expressions</li>
  +<li><b>NOTE:</b> A context menu is available anywhere you can enter an
expression in order to assist in constructing expressions (use the right-mouse click or ctrl-space
to activate the context menu) </li>
   </ul>
   
  -<p><b>To define an expression:</b>
  +<b>To define an expression:</b>
   <ol>
  -<li>Select the field identifier (a keyword representing a logging event field) needed
to perform the filtering operation.  For example, to filter on the 'message' portion of an
event, use the <b>MSG</b> field identifier</li>
  -<li>Select the operator needed to perform the filtering operation.  For example,
to perform a case-insensitive partial-text filtering operation, use the <b>~=</b>
operator</li>
  -<li>(Required by all operators except logical operators) Define the value to be matched
in the expression</li>
  -<p>For example, to display only events with the word 'result' in the message field,
the matching expression is <b>msg ~= result</b>
  -<p>
  +<li>Select the field identifier (a keyword representing a logging event field) required
to perform the evaluation.  For example, to define an expression which evaluates the 'message'
field, use the <b>MSG</b> field identifier (list of supported field identifiers
provided below)</li>
  +<li>Select the operator needed to perform the filtering operation (list of supported
operators provided below).  For example, to perform a case-insensitive partial-text filtering
operation, use the <b>~=</b> operator</li>
  +<li>Define the value to be matched in the expression (Required by all operators except
logical operators)</li>
  +<p>
  +For example, to display only events which contain the word 'result' in the message field,
the matching expression is <b>msg ~= result</b>
  +<li>The field identifier/operator/operand combination is a valid expression, but
can be used in combination with other expressions and logical operators to build complex expressions</li>
  +<li>Modify the precedence expressions in a complex expression by using parentheses</li>
  +</ol>
  +
   <b>Supported field identifiers:</b>
   <ul>
   <li>LOGGER</li>
  @@ -169,13 +146,14 @@
   <li>MDC</li>
   <li>PROP (properties)</li>
   </ul>
  -<p>
  -<li>To build expressions using <b>MDC</b> or <b>PROP (properties)</b>,
the key being evaluated must be added after the field identifier and a period.
  -   For example, every event contains a '<b>log4jid</b>' property (helpful during
import/export of events).  
  -   To refine the display to only show rows 50 through 60, specify this expression in the
'refine focus' text field: <b>PROP.log4jid &gt= 50 && PROP.log4jid &lt=
60</b>
  -   <b>NOTE:</b> case matters when specifying the key.  <b>PROP.log4jid</b>
is <b>not</b> the same as <b>PROP.LOG4JID</b></li>
   
  -<p><b>Supported operators:</b></p>
  +<li><b>NOTE: </b>To build expressions using <b>MDC</b> or
<b>PROP (properties)</b>, the key being evaluated must be added after the field
identifier, followed by a period (.)</li>
  +  <p>For example, all events in the event table contain a '<b>log4jid</b>'
property (used during import/export of events)  
  +   <p>To refine the display to only show rows 50 through 60, specify this expression
in the 'refine focus' text field: <b>PROP.log4jid &gt= 50 && PROP.log4jid
&lt= 60</b>
  +   <p><b>NOTE:</b> case matters when specifying the key.  <b>PROP.log4jid</b>
is <b>not</b> the same as <b>PROP.LOG4JID</b></li>
  +
  +<p>
  +<b>Supported operators:</b></p>
   <table border=1>
   <th>Symbol</th><th>Description</th>
   <tr><td align="center">==</td><td>equals</td></tr>
  @@ -191,21 +169,55 @@
   <tr><td align="center">||</td><td>logical or</td></tr>
   <tr><td align="center">!</td><td>logical not</td></tr>
   </table>
  -</ol>
  -<p><b>Operator limitations:</b>
  +
  +<p><b>Operator limitations:</b></p>
   <ul>
  -<li>The equality operator can be used with the LEVEL identifier, but since it's executing
the equals method, use uppercase for the right-hand value (<b>LEVEL == WARN</b>
instead of <b>LEVEL == warn</b>)</li>
  -<li>Inequality operators are supported for Levels (<b>LEVEL &gt INFO</b>)
and anything that can be converted to a numeric value.</li>
  +<li>The equality operator can be used with the LEVEL identifier, but for the comparison
to succeed, the right hand value must be in all uppercase (this applies to the combination
of LEVEL keyword and the equality operator only - for example, use <b>LEVEL == WARN</b>
instead of <b>LEVEL == warn</b></li>
  +<li>Inequality operators are supported for Levels (<b>LEVEL &gt info</b>)
and anything that can be converted to a numeric value.</li>
   <li>Expressions using the timestamp field are not yet supported</li>
   </ul>
  +
   <p><B>Example expressions:</B></p>
   <table border = 1>
   <tr><td>To display all events with a level of info or greater</td><td><b>LEVEL
&gt= INFO</b></td></tr>
  -<tr><td>To display all events associated with the words 'logged in' in the
message</td><td> <b>MSG ~= 'logged in'</b></td></tr>
  +<tr><td>To display all events which contain the words 'logged in' in the message</td><td>
<b>MSG ~= 'logged in'</b></td></tr>
   <tr><td>To display all events which contain an exception</td><td><b>EXCEPTION
EXISTS</b></td></tr>
   <tr><td>To display all events associated with an MDC key of USERID with a value
of 'tester'</td><td><b>MDC.USERID == tester</b></td></tr>
   <tr><td>'and' the first and second examples together, 'or'd with the third</td><td><b>(
LEVEL &gt= INFO && MSG ~= 'logged in' ) || EXCEPTION EXISTS</b></td></tr>
   </table>
  +
  +<A NAME="color_filter"><h3>Color filters</h3>
  +Each log panel can define color rules which can be used to colorize events in the event
panel.  Color rules are associated with each event panel and are saved when the application
ends and loaded automatically when the application starts.
  +
  +<p><b>Define color rules:</b></p>
  +<ol>
  +<li>Open the color filter panel by selecting the 'current tab, log panel color filter'
menu items, or by using the context (right-click mouse) menu in the events panel and selecting
'log panel color filter'</li>
  +<li>Select 'new' to add a row</li>
  +<li>Double-click on the 'expression' column</li>
  +<li>Enter an expression (see <a href="#expressions">Expressions</a> section
below)</li>
  +<li>Select a color from the list or use the 'browse' button at the bottom of the
color list to define a custom color</li>
  +<li>Repeat steps 2 - 5 as needed</li>
  +<li>Order the rules - events are evaluated against color rules in order.  Select
a color rule entry and press the UP or DOWN icons on the panel as needed</li>
  +<li>Apply the rules.  The event panel will be updated based on the defined color
rules</li>
  +<li>If there are invalid expressions, a message at the bottom will direct you to
hover the mouse over an expression to see the error as the entry's tooltip</li>
  +<li>Fix errors as needed, apply and close the panel</li>
  +</ol>
  +
  +<A NAME="display_filter"><h3>Display filters (refine focus)</h3>
  +Events displayed in the event panel can be filtered in two ways: by focusing on a logger
in the logger tree panel and by defining display filter rules in the 'refine focus' field.
 
  +<p>
  +<b>NOTE:</b>Display filter rules are not saved. 
  +
  +<p>
  +<b>Define display rules:</b></p>
  +<ol>
  +<li>Move the cursor to the 'refine focus on' field</li>
  +<li>Enter an expression (see <a href="#expressions">Expressions</a> section
below)</li>
  +<li>Alternatively, use the context (mouse right click) menu (available when the mouse
pointer is over the events table) to modify the 'refine focus' field's expression based on
the field and value under the mouse pointer.  For example, if the mouse pointer is over the
LEVEL cell of an event which has a value of INFO, selecting <b>set 'refine focus' field</b>
will assign the expression <b>LEVEL == 'INFO'</b> to the refine focus field.</li>
  +<li>The display will be updated automatically if the expression is valid and the
contents of the 'refine focus' field have not changed for 1 second, showing only events which
match the expression</li>
  +<li>If the expression entered is invalid, an error message will available as the
'refine focus on' field's tooltip</li>
  +<li>If the <b>ENTER</b> key is pressed when a valid expression is in
the 'refine focus on' field, the expression is added to the refine focus drop down list and
can be recalled later in the session</li>
  +</ol>
   
   <h2>Shutting down the Tutorial</h2>
   <p>
  
  
  

---------------------------------------------------------------------
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