Package org.apache.log4j.rule

Examples of org.apache.log4j.rule.AbstractRule


    this.logTreeModel = logTreeModel;
    this.preferenceModel = preferenceModel;

    setLayout(new BorderLayout());

    ruleDelegate = new AbstractRule() {
      public boolean evaluate(LoggingEvent e)
        {
          String currentlySelectedLoggerName = getCurrentlySelectedLoggerName();
          if (currentlySelectedLoggerName == null) {
            //if there is no selected logger, all events should pass
            return true;
          }
          boolean isHidden = getHiddenSet().contains(e.getLoggerName());
          boolean result = (e.getLoggerName() != null) && (!isHidden);

          if (result && isFocusOnSelected())
          {
            result = result &&  (e.getLoggerName() != null && (e.getLoggerName().startsWith(currentlySelectedLoggerName+".") || e.getLoggerName().endsWith(currentlySelectedLoggerName))) ;
          }

          return result;
        }
      };
   
    colorRuleDelegate =
        new AbstractRule()
        {
          public boolean evaluate(LoggingEvent e)
          {
            boolean isHidden = getHiddenSet().contains(e.getLoggerName());
            String currentlySelectedLoggerName = getCurrentlySelectedLoggerName();
View Full Code Here

TOP

Related Classes of org.apache.log4j.rule.AbstractRule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.