Package org.apache.log4j.pattern

Examples of org.apache.log4j.pattern.PatternConverter


      getLogger().error("Error occured while sending e-mail notification.", e);
    }
  }

  String computeSubject(LoggingEvent triggeringEvent) {
    PatternConverter c = this.subjectConverterHead;
    StringWriter sw = new StringWriter();
    try {
      while (c != null) {
        c.format(sw, triggeringEvent);
        c = c.next;
      }
    } catch(java.io.IOException ie) {
      // this should not happen
    }
View Full Code Here


  /**
     Produces a formatted string as specified by the conversion pattern.
  */
  public  void format(Writer output, LoggingEvent event) throws IOException {
    PatternConverter c = head;
    while (c != null) {
      c.format(output, event);
      c = c.next;
    }
  }
View Full Code Here

  /**
     Produces a formatted string as specified by the conversion pattern.
  */
  public  void format(Writer output, LoggingEvent event) throws IOException {
    PatternConverter c = head;
    while (c != null) {
      c.format(output, event);
      c = c.next;
    }
  }
View Full Code Here

   * Prepares instance of use.
   */
  public void activateOptions() {
    super.activateOptions();

    PatternConverter dtc = getDatePatternConverter();

    if (dtc == null) {
      throw new IllegalStateException(
        "FileNamePattern [" + getFileNamePattern()
        + "] does not contain a valid date format specifier");
View Full Code Here

      LogLog.warn("Large window sizes are not allowed.");
      maxIndex = minIndex + MAX_WINDOW_SIZE;
      LogLog.warn("MaxIndex reduced to " + String.valueOf(maxIndex) + ".");
    }

    PatternConverter itc = getIntegerPatternConverter();

    if (itc == null) {
      throw new IllegalStateException(
        "FileNamePattern [" + getFileNamePattern()
        + "] does not contain a valid integer format specifier");
View Full Code Here

   * Prepares instance of use.
   */
  public void activateOptions() {
    super.activateOptions();

    PatternConverter dtc = getDatePatternConverter();

    if (dtc == null) {
      throw new IllegalStateException(
        "FileNamePattern [" + getFileNamePattern()
        + "] does not contain a valid date format specifier");
View Full Code Here


    sbuf.append("<tr class=\"header\">");
    sbuf.append(Layout.LINE_SEP);
    for (int i = 0; i < patternConverters.length; i++) {
        PatternConverter c = patternConverters[i];
        sbuf.append("<td class=\"");
        sbuf.append(c.getStyleClass(null).toLowerCase());
        sbuf.append("\">");
        sbuf.append(c.getName());
        sbuf.append("</td>");
        sbuf.append(Layout.LINE_SEP);
    }
    sbuf.append("</tr>");
    sbuf.append(Layout.LINE_SEP);
View Full Code Here

      buf.append(" even\">");
    }
    buf.append(Layout.LINE_SEP);
  
    for(int i = 0; i < patternConverters.length; i++) {
        PatternConverter c = patternConverters[i];
        buf.append("<td class=\"");
        buf.append(c.getStyleClass(event).toLowerCase());
        buf.append("\">");
        int fieldStart = buf.length();
        c.format(event, buf);
        patternFields[i].format(fieldStart, buf);
        buf.append("</td>");
        buf.append(Layout.LINE_SEP);
    }
    buf.append("</tr>");
View Full Code Here

      getLogger().warn("Large window sizes are not allowed.");
      maxIndex = minIndex + MAX_WINDOW_SIZE;
      getLogger().warn("MaxIndex reduced to {}.", new Integer(maxIndex));
    }

    PatternConverter itc = getIntegerPatternConverter();

    if (itc == null) {
      throw new IllegalStateException(
        "FileNamePattern [" + getFileNamePattern()
        + "] does not contain a valid integer format specifier");
View Full Code Here

   * Prepares instance of use.
   */
  public void activateOptions() {
    super.activateOptions();

    PatternConverter dtc = getDatePatternConverter();

    if (dtc == null) {
      throw new IllegalStateException(
        "FileNamePattern [" + getFileNamePattern()
        + "] does not contain a valid date format specifier");
View Full Code Here

TOP

Related Classes of org.apache.log4j.pattern.PatternConverter

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.