Package org.apache.log4j.spi

Examples of org.apache.log4j.spi.ErrorItem


      String errMsg =
        "no applicable action for <" + tagName + ">, current pattern is ["
        + pattern+"]";
      getLogger().warn(errMsg);
      ec.addError(new ErrorItem(errMsg));
    }
  }
View Full Code Here


        }
        getLogger().info("Skip pattern set to <{}>", skip);
      } catch (Exception e) {
        skip = (Pattern) pattern.clone();
        getLogger().info("Skip pattern set to <{}>", skip);
        ec.addError(new ErrorItem("Exception in Action for tag <"+tagName+">", e));
      }
    }
  }
View Full Code Here

          skip.pop();
          break;
        }
        getLogger().info("Skip pattern set to <{}>", skip);
      } catch(Exception e) {
        ec.addError(new ErrorItem("Exception in Action for tag <"+tagName+">", e));
        skip = (Pattern) pattern.clone();
        skip.pop(); // induce the siblings to be skipped
        getLogger().info("Skip pattern set to <{}>.", skip);
      }
    }
View Full Code Here

//      }
//    }
//  }

  public void error(SAXParseException spe) throws SAXException {
    ec.addError(new ErrorItem("Parsing error", spe));
    getLogger().error(
      "Parsing problem on line " + spe.getLineNumber() + " and column "
      + spe.getColumnNumber(), spe);
  }
View Full Code Here

      "Parsing problem on line " + spe.getLineNumber() + " and column "
      + spe.getColumnNumber(), spe);
  }

  public void fatalError(SAXParseException spe) throws SAXException {
    ec.addError(new ErrorItem("Parsing fatal error", spe));
    getLogger().error(
      "Parsing problem on line " + spe.getLineNumber() + " and column "
      + spe.getColumnNumber(), spe);
  }
View Full Code Here

      "Parsing problem on line " + spe.getLineNumber() + " and column "
      + spe.getColumnNumber(), spe);
  }

  public void warning(SAXParseException spe) throws SAXException {
    ec.addError(new ErrorItem("Parsing warning", spe));
    getLogger().warn(
      "Parsing problem on line " + spe.getLineNumber() + " and column "
      + spe.getColumnNumber(), spe);
  }
View Full Code Here

        spf.setNamespaceAware(true);
        saxParser = spf.newSAXParser();
    } catch (Exception pce) {
      final String errMsg = "Parser configuration error occured";
      getLogger(repository).error(errMsg, pce);
      ec.addError(new ErrorItem(errMsg, pce));
      return;
    }
   
    JoranDocument document = new JoranDocument(errorList, repository);
   
    try {
        action.parse(saxParser, document);
    } catch(IOException ie) {
      final String errMsg = "I/O error occured while parsing xml file";
      getLogger(repository).error(errMsg, ie);
      ec.addError(new ErrorItem(errMsg, ie));
    } catch (Exception ex) {
      final String errMsg = "Problem parsing XML document. See previously reported errors. Abandoning all further processing.";
      getLogger(repository).error(errMsg, ex);
      errorList.add(
        new ErrorItem(errMsg));
      return;
    }
   
    ec.pushObject(repository);
    String errMsg;
View Full Code Here

    errorReport(spe);
  }

  private void errorReport(final SAXParseException spe) {
    int line = spe.getLineNumber();
    ErrorItem errorItem = new ErrorItem("Parsing warning", spe);
    errorItem.setLineNumber(line);
    errorItem.setColNumber(spe.getColumnNumber());
    errorList.add(errorItem);
  }
View Full Code Here

   
    ListAppender listAppender = (ListAppender) ll.getAppender(Constants.TEMP_LIST_APPENDER_NAME);
    if(listAppender == null) {
      String errMsg = "Could not find appender "+Constants.TEMP_LIST_APPENDER_NAME;
      getLogger(repository).error(errMsg);
      addError(new ErrorItem(errMsg));
      return;
    }
   
    List eventList = listAppender.getList();
    int size = eventList.size();
View Full Code Here

    ConsoleAppender consoleAppender =
      (ConsoleAppender) ll.getAppender(Constants.TEMP_CONSOLE_APPENDER_NAME);
    if (consoleAppender == null) {
      String errMsg =
        "Could not find appender " + Constants.TEMP_LIST_APPENDER_NAME;
      errorList.add(new ErrorItem(errMsg));
      return;
    }
    consoleAppender.close();
    ll.removeAppender(consoleAppender);
  }
View Full Code Here

TOP

Related Classes of org.apache.log4j.spi.ErrorItem

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.