Examples of ThrowableProxy


Examples of ch.qos.logback.classic.spi.ThrowableProxy

    }
  }
 
  public void render(StringBuilder sbuf, Object eventObject) {
    LoggingEvent event = (LoggingEvent)eventObject;
    ThrowableProxy tp = event.getThrowableProxy();
    if (tp != null) {
      render(sbuf, tp.getThrowableDataPointArray());
    }
  }
View Full Code Here

Examples of ch.qos.logback.classic.spi.ThrowableProxy

  }
 
  public String convert(LoggingEvent event) {
    StringBuilder buf = new StringBuilder(32);

    ThrowableProxy information = event.getThrowableProxy();

    if (information == null) {
      return CoreConstants.EMPTY_STRING;
    }

    ThrowableDataPoint[] tdpArray = information.getThrowableDataPointArray();

    int length = (lengthOption > tdpArray.length) ? tdpArray.length
        : lengthOption;

    // an evaluator match will cause stack printing to be skipped
View Full Code Here

Examples of ch.qos.logback.classic.spi.ThrowableProxy

    }
  }
 
  public void render(StringBuilder sbuf, Object eventObject) {
    LoggingEvent event = (LoggingEvent)eventObject;
    ThrowableProxy tp = event.getThrowableProxy();
    if (tp != null) {
      render(sbuf, tp.getThrowableDataPointArray());
    }
  }
View Full Code Here

Examples of ch.qos.logback.classic.spi.ThrowableProxy

  }
 
  public String convert(LoggingEvent event) {
    StringBuilder buf = new StringBuilder(32);

    ThrowableProxy information = event.getThrowableProxy();

    if (information == null) {
      return CoreGlobal.EMPTY_STRING;
    }

    ThrowableDataPoint[] tdpArray = information.getThrowableDataPointArray();

    int length = (lengthOption > tdpArray.length) ? tdpArray.length
        : lengthOption;

    // an evaluator match will cause stack printing to be skipped
View Full Code Here

Examples of ch.qos.logback.classic.spi.ThrowableProxy

      }
    }
  }

  protected void prepareLoggingEvent(LoggingEvent event) {
    ThrowableProxy tp = event.getThrowableProxy();
    tp.calculatePackagingData();
  }
View Full Code Here

Examples of ch.qos.logback.classic.spi.ThrowableProxy

    );
    evt.setTimeStamp(rec.getTimestamp());
    evt.setThreadName(rec.getThreadName());
    evt.setMDCPropertyMap(rec.getMdcProps());
    if (null != rec.getCause()) {
      evt.setThrowableProxy(new ThrowableProxy(rec.getCause()));
    }
    evt.setCallerData(rec.getCallerData());

    return evt;
  }
View Full Code Here

Examples of ch.qos.logback.classic.spi.ThrowableProxy

        assertThat(outputStream.toString(), Matchers.endsWith(LINE_SEPARATOR));
    }
   
    @Test
    public void includingThrowableProxyIncludesStackTrace() throws Exception {
        IThrowableProxy throwableProxy = new ThrowableProxy(new Exception("My goodness"));
       
        ILoggingEvent event = mockBasicILoggingEvent(Level.ERROR);
        when(event.getThrowableProxy()).thenReturn(throwableProxy);
       
        encoder.doEncode(event);
View Full Code Here

Examples of ch.qos.logback.classic.spi.ThrowableProxy

    assertThat(s, equalTo(""));
  }

  @Test
  public void withStackTrace() throws Exception {
    this.event.setThrowableProxy(new ThrowableProxy(new RuntimeException()));
    String s = this.converter.convert(this.event);
    assertThat(s, startsWith(LINE_SEPARATOR));
    assertThat(s, endsWith(LINE_SEPARATOR));
  }
View Full Code Here

Examples of ch.qos.logback.classic.spi.ThrowableProxy

    buf.append("]]></log4j:message>\r\n");

    // logback does not support NDC
    // String ndc = event.getNDC();

    ThrowableProxy tp = event.getThrowableProxy();

    if (tp != null) {
      buf.append("  <log4j:throwable><![CDATA[");
      ThrowableDataPoint[] tdpArray = tp.getThrowableDataPointArray();
      for (ThrowableDataPoint tdp : tdpArray) {
        buf.append(tdp.toString());
        buf.append("\r\n");
      }
      buf.append("]]></log4j:throwable>\r\n");
View Full Code Here

Examples of ch.qos.logback.classic.spi.ThrowableProxy

    }
  }
 
  public void render(StringBuilder sbuf, Object eventObject) {
    LoggingEvent event = (LoggingEvent)eventObject;
    ThrowableProxy tp = event.getThrowableProxy();
    if (tp != null) {
      render(sbuf, tp.getThrowableDataPointArray());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.