View Javadoc

1   /**
2    * Logback: the generic, reliable, fast and flexible logging framework.
3    * 
4    * Copyright (C) 2000-2008, QOS.ch
5    * 
6    * This library is free software, you can redistribute it and/or modify it under
7    * the terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation.
9    */
10  package ch.qos.logback.core.status;
11  
12  import ch.qos.logback.core.util.StatusPrinter;
13  
14  /**
15   * Print all new incoming status messages on the console.
16   * 
17   * @author Ceki Gülcü
18   *
19   */
20  public class OnConsoleStatusListener implements StatusListener {
21  
22  
23    public void addStatusEvent(Status status) {
24      StringBuilder sb = new StringBuilder();
25      StatusPrinter.buildStr(sb, "", status);
26      System.out.print(sb);
27    }
28  }