Package org.platformlayer.jobs.model

Examples of org.platformlayer.jobs.model.JobLogExceptionInfo


      color = Ansi.Color.Blue;
    }

    ansi.println(color, indent + line.message);

    JobLogExceptionInfo exceptionInfo = line.exception;
    while (exceptionInfo != null) {
      for (String exceptionLine : exceptionInfo.info) {
        ansi.println(color, indent + exceptionLine);
      }
View Full Code Here


  public SimpleJobLogger() {
  }

  @Override
  public void logMessage(String message, List<String[]> exceptionStacks, int level) {
    JobLogExceptionInfo jobLogExceptionInfo = null;
    if (exceptionStacks != null) {
      jobLogExceptionInfo = JobUtils.buildJobLogExceptionInfo(exceptionStacks);
    }

    JobLogLine jobLogLine = new JobLogLine(System.currentTimeMillis(), level, message, jobLogExceptionInfo);
View Full Code Here

  public String toString() {
    StringBuilder sb = new StringBuilder();
    for (JobLogLine jobLogLine : this.getLogEntries()) {
      sb.append(jobLogLine.getMessage());

      JobLogExceptionInfo exception = jobLogLine.getException();

      if (exception != null) {
        List<String> infos = exception.getInfo();

        for (int i = 0; i < infos.size(); i++) {
          String infoLine = infos.get(i);
          if (i != 0) {
            sb.append('\n');
View Full Code Here

      mapToProtobuf(exception.inner, exceptionBuilder.getInnerBuilder());
    }
  }

  private JobLogExceptionInfo mapFromProtobuf(JobDataProtobuf.JobLogExceptionInfo.Builder exceptionBuilder) {
    JobLogExceptionInfo exception = new JobLogExceptionInfo();
    exception.info = Lists.newArrayList();
    for (String info : exceptionBuilder.getInfoList()) {
      exception.info.add(info);
    }
View Full Code Here

  public static JobLogExceptionInfo buildJobLogExceptionInfo(List<String[]> exceptionStacks) {
    if (exceptionStacks == null || exceptionStacks.isEmpty()) {
      return null;
    }

    JobLogExceptionInfo ret = null;

    for (String[] exceptionStack : Lists.reverse(exceptionStacks)) {
      JobLogExceptionInfo exception = new JobLogExceptionInfo();
      exception.getInfo().addAll(Arrays.asList(exceptionStack));
      exception.inner = ret;
      ret = exception;
    }

    return ret;
View Full Code Here

TOP

Related Classes of org.platformlayer.jobs.model.JobLogExceptionInfo

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.