Package com.baulsupp.kolja.log.line

Examples of com.baulsupp.kolja.log.line.Line


  protected boolean isEnd() {
    return isQuit || !i.hasNext();
  }

  protected void showNextLine() {
    Line l = i.next();
    renderer.show(l);
  }
View Full Code Here


      BasicLineIterator i = new BasicLineIterator(lineIndex);
     
      EventList eventIndex = format.getEventList(lineIndex);
     
      while (i.hasNext()) {
        Line line = i.next();
        Event event = eventIndex.readEvent(line);
       
        if (event != null) {
          System.out.println(event.toString());
        }
View Full Code Here

  }

  @Override
  protected void append(LoggingEvent arg0) {
    try {
      Line l = buildLine(arg0);
      renderer.show(l);
    } catch (Exception e) {
      System.err.println(e);
    }
  }
View Full Code Here

      System.err.println(e);
    }
  }

  private Line buildLine(LoggingEvent arg0) {
    Line line = new BasicLine(arg0.toString());

    line.setValue(LogConstants.DATE, new Date(arg0.timeStamp));
    line.setValue(LogConstants.CONTENT, arg0.getMessage());

    line.setValue(LogConstants.EXCEPTION, join(arg0.getThrowableStrRep()));
    line.setValue(LogConstants.PRIORITY, Priority.getByName(arg0.getLevel().toString()));
    line.setValue(LogConstants.LOGGER, arg0.getLoggerName());
    line.setValue(LogConstants.THREAD, arg0.getThreadName());

    return line;
  }
View Full Code Here

  }

  @Override
  protected void append(LoggingEvent arg0) {
    try {
      Line l = buildLine(arg0);
      renderer.show(l);
    } catch (Exception e) {
      System.err.println(e);
    }
  }
View Full Code Here

      System.err.println(e);
    }
  }

  private Line buildLine(LoggingEvent le) {
    Line line = new BasicLine(le.toString());

    line.setValue(LogConstants.DATE, new DateTime(le.getTimeStamp()));
    line.setValue(LogConstants.CONTENT, le.getMessage());

    line.setValue(LogConstants.EXCEPTION, join(le.getThrowableInformation().getThrowableStrRep()));
    line.setValue(LogConstants.PRIORITY, Priority.getByName(le.getLevel().toString()));
    line.setValue(LogConstants.LOGGER, le.getLoggerRemoteView().getName());
    line.setValue(LogConstants.THREAD, le.getThreadName());

    for (Map.Entry<String, String> e : le.getMDCPropertyMap().entrySet()) {
      line.setValue(e.getKey(), e.getValue());
    }

    return line;
  }
View Full Code Here

  protected boolean isEnd() {
    return isQuit || !i.hasNext();
  }

  protected void showNextLine() {
    Line l = i.next();
    renderer.show(l);
  }
View Full Code Here

  public int previous(int i) {
    model.moveTo(i);

    while (model.hasPrevious()) {
      Line l = (Line) model.previous();
      if (matches(l)) {
        return l.getIntOffset();
      }
    }
    return -1;
  }
View Full Code Here

  public int next(int i) {
    model.moveTo(i + 1);

    while (model.hasNext()) {
      Line l = (Line) model.next();
      if (matches(l)) {
        return l.getIntOffset();
      }
    }
    return -1;
  }
View Full Code Here

TOP

Related Classes of com.baulsupp.kolja.log.line.Line

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.