Examples of ThrowableInformation


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

  public String convert(Object event) {
    StringBuffer buf = new StringBuffer(32);

    LoggingEvent le = (LoggingEvent) event;
    ThrowableInformation information = le.getThrowableInformation();

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

    String[] stringRep = information.getThrowableStrRep();

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

    if (evaluatorList != null) {
      boolean printStack = true;
View Full Code Here

Examples of org.apache.log4j.spi.ThrowableInformation

    public void doAppend( LoggingEvent event )
    {
        m_output = true;
        m_priority = event.getLevel();
        m_message = (String)event.getMessage();
        final ThrowableInformation information = event.getThrowableInformation();
        if( null != information )
        {
            m_throwable = information.getThrowable();
        }
    }
View Full Code Here

Examples of org.apache.log4j.spi.ThrowableInformation

  @Override
  protected void append(final LoggingEvent loggingEvent) {
    final StringBuilder buf = new StringBuilder();
    buf.append(getLayout().format(loggingEvent));
    final ThrowableInformation ti = loggingEvent.getThrowableInformation();

    if (ti != null) {
      final String[] cause = ti.getThrowableStrRep();

      for (final String line : cause) {
        buf.append(line).append('\n');
      }
    }
View Full Code Here

Examples of org.apache.log4j.spi.ThrowableInformation

    root.debug("%throwable{100}, with exception", ex);

    //
    //  manufacture a pattern to get just the first two lines
    //
    String[] trace = new ThrowableInformation(ex).getThrowableStrRep();
    layout.setConversionPattern("%m%n%throwable{" + (2 - trace.length) + "}");
    layout.activateOptions();
    root.debug("%throwable{-n}, no exception");
    root.debug("%throwable{-n}, with exception", ex);
View Full Code Here

Examples of org.apache.log4j.spi.ThrowableInformation

            String renderedMessage = event.getRenderedMessage();
            if (renderedMessage != null)
            {
                message.append(renderedMessage);
            }
            ThrowableInformation ti = event.getThrowableInformation();
            if (ti != null)
            {
                Throwable t = ti.getThrowable();
                if (t != null)
                {
                    if (message.length() > 0)
                    {
                        message.append(":");
View Full Code Here

Examples of org.apache.log4j.spi.ThrowableInformation

      loggingEvent.setTimeStamp(timeStamp);
      loggingEvent.setLevel(levelImpl);
      loggingEvent.setThreadName(threadName);
      loggingEvent.setMessage(message);
      loggingEvent.setNDC(ndc);
      loggingEvent.setThrowableInformation(new ThrowableInformation(exception));
      loggingEvent.setProperties(properties);
     
      events.add(loggingEvent);
    
      logger = null;
View Full Code Here

Examples of org.apache.log4j.spi.ThrowableInformation

   * @see org.apache.log4j.pattern.PatternConverter#convert(org.apache.log4j.spi.LoggingEvent)
   */
  protected StringBuffer convert(LoggingEvent event) {
    StringBuffer buf = new StringBuffer(32);

    ThrowableInformation information = event.getThrowableInformation();

    if (information == null) {
      return buf;
    }

    String[] stringRep = information.getThrowableStrRep();

    int length = 0;

    if (option == null) {
      length = stringRep.length;
View Full Code Here

Examples of org.apache.log4j.spi.ThrowableInformation

                            message, null);
                    event.setLocationInformation(new LocationInfo(fileName,
                            className, methodName, lineNumber));
                    properties.putAll(mdc);
                    event.setTimeStamp(timeStamp);
                    event.setThrowableInformation(new ThrowableInformation(
                            exception));

                    event.setProperties(properties);
                    event.setThreadName(threadName);
                    event.setNDC(ndc);
View Full Code Here

Examples of org.apache.log4j.spi.ThrowableInformation

      String[] strRep = new String[len];
      for (int i = 0; i < len; i++) {
        strRep[i] = (String) v.get(i);
      }
      // we've filled strRep, we now attach it to the event
      event.setThrowableInformation(new ThrowableInformation(strRep));
    } finally {
      if (statement != null) {
        statement.close();
      }
    }
View Full Code Here

Examples of org.apache.log4j.spi.ThrowableInformation

    event.setLogger(logger);
    event.setTimeStamp(timeStamp);
    event.setLevel(levelImpl);
    event.setThreadName(threadName);
    event.setMessage(message);
    event.setThrowableInformation(new ThrowableInformation(exception));
    event.setLocationInformation(info);
    event.setNDC(ndc);
    event.setProperties(properties);
    return event;
  }
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.