Package ch.qos.logback.classic.spi

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


    }

    @Override
    public Throwable getThrowable() {
        Throwable result = null;
        IThrowableProxy throwableProxy = loggingEvent.getThrowableProxy();
        if (null != throwableProxy) {
            if (throwableProxy instanceof ThrowableProxy) {
                result = ((ThrowableProxy) throwableProxy).getThrowable();
            }
        }
View Full Code Here


    }

    @Override
    public Throwable getThrowable() {
        Throwable result = null;
        IThrowableProxy throwableProxy = loggingEvent.getThrowableProxy();
        if (null != throwableProxy) {
            if (throwableProxy instanceof ThrowableProxy) {
                result = ((ThrowableProxy) throwableProxy).getThrowable();
            }
        }
View Full Code Here

      String message = stringOrNull(datum.get("message"));
      int commonFramesCount = (Integer) datum.get("commonFramesCount");
      @SuppressWarnings("unchecked") StackTraceElementProxy[] steArray =
        StackTraceElementProxyArraySerializer.decode(
          (GenericArray<GenericRecord>) datum.get("stackTraceElementProxyArray"));
      IThrowableProxy cause = ThrowableProxySerializer.decode((GenericRecord) datum.get("cause"));
      @SuppressWarnings("unchecked") IThrowableProxy[] suppressed = ThrowableProxyArraySerializer.decode(
        (GenericArray<GenericRecord>) datum.get("suppressed"));
      return new ThrowableProxyImpl(cause, className, commonFramesCount, message, steArray, suppressed);
    }
    return null;
View Full Code Here

    }

    @Override
    public Throwable getThrowable() {
        if (th == null) {
            final IThrowableProxy throwableProxy = event.getThrowableProxy();
            if (throwableProxy != null) {
                if ((throwableProxy instanceof ThrowableProxy)) {
                    final ThrowableProxy throwableProxyImpl = (ThrowableProxy) throwableProxy;
                    th = throwableProxyImpl.getThrowable();
                }
View Full Code Here

  protected void postProcess(Object eventObject, OutputStream sw) {
    if (throwableExcluded)
      return;

    ILoggingEvent event = (ILoggingEvent) eventObject;
    IThrowableProxy tp = event.getThrowableProxy();

    if(tp == null)
      return;


    String stackTracePrefix = stackTraceLayout.doLayout(event);

    while (tp != null) {
      StackTraceElementProxy[] stepArray = tp.getStackTraceElementProxyArray();
      try {
        for (StackTraceElementProxy step : stepArray) {
          StringBuilder sb = new StringBuilder();
          sb.append(stackTracePrefix).append(step);
          sw.write(sb.toString().getBytes());
          sw.flush();
        }
      } catch (IOException e) {
        break;
      }
      tp = tp.getCause();
    }
  }
View Full Code Here

TOP

Related Classes of ch.qos.logback.classic.spi.IThrowableProxy

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.