Package ch.qos.logback.core.status

Examples of ch.qos.logback.core.status.Status


    assertTrue(receiver.isStarted());
    IOException ex = new IOException("test exception");
    runner.setStopException(ex);
    receiver.stop();
   
    Status status = context.getLastStatus();
    assertNotNull(status);   
    assertTrue(status instanceof ErrorStatus);
    assertTrue(status.getMessage().contains(ex.getMessage()));
    assertSame(ex, status.getThrowable());
  }
View Full Code Here


    root.addAppender(listAppender);
    Logger logger = lc.getLogger(LoggerTest.class);
    logger.debug("hello");

    List<Status> statusList = lc.getStatusManager().getCopyOfStatusList();
    Status s0 = statusList.get(0);
    assertEquals(Status.WARN, s0.getLevel());
    assertTrue(s0.getMessage().startsWith("Attempted to append to non started"));
  }
View Full Code Here

    public String getTarget() {
      return target;
    }

    void targetWarn(String val) {
      Status status = new WarnStatus("["+val+" should be System.out or System.err.", this);
      status.add(new WarnStatus("Using previously set target, System.out by default.", this));
      addStatus(status);
    }
View Full Code Here

 

  private static void buildStrFromStatusList(StringBuilder sb, List<Status> statusList) {
    Iterator it = statusList.iterator();
    while (it.hasNext()) {
      Status s = (Status) it.next();
      buildStr(sb, "", s);
    }
  }
View Full Code Here

      appendThrowable(sb, s.getThrowable());
    }
    if (s.hasChildren()) {
      Iterator<Status> ite = s.iterator();
      while (ite.hasNext()) {
        Status child = ite.next();
        buildStr(sb, indentation + "  ", child);
      }
    }
  }
View Full Code Here

  public static void print(StatusManager sm) {

    Iterator it = sm.iterator();
    while (it.hasNext()) {
      Status s = (Status) it.next();
      print("", s);
    
    }
  }
View Full Code Here

      s.getThrowable().printStackTrace(ps);
    }
    if(s.hasChildren()) {
      Iterator<Status> ite = s.iterator();
      while(ite.hasNext()) {
        Status child = ite.next();
        print(indentation+"  ", child);
      }
     
    }
  }
View Full Code Here

    public String getTarget() {
      return target;
    }

    void targetWarn(String val) {
      Status status = new WarnStatus("["+val+" should be System.out or System.err.", this);
      status.add(new WarnStatus("Using previously set target, System.out by default.", this));
      addStatus(status);
    }
View Full Code Here

    public String getTarget() {
      return target;
    }

    void targetWarn(String val) {
      Status status = new WarnStatus("["+val+" should be System.out or System.err.", this);
      status.add(new WarnStatus("Using previously set target, System.out by default.", this));
      addStatus(status);
    }
View Full Code Here

  }

  public static void buildStr(StringBuilder sb, StatusManager sm) {
    Iterator it = sm.getCopyOfStatusList().iterator();
    while (it.hasNext()) {
      Status s = (Status) it.next();
      buildStr(sb, "", s);
    }
  }
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.status.Status

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.