[GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v_0.9.25-10-g0eeea76

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Logback: the generic, reliable, fast and flexible logging framework.". The branch, master has been updated via 0eeea7653973434f7288b53f741d9c16bd4a300c (commit) from ca7ec46c41a2d026fc3e2ad137962cf1e679a16b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=0eeea7653973434f7288b53f7... http://github.com/ceki/logback/commit/0eeea7653973434f7288b53f741d9c16bd4a30... commit 0eeea7653973434f7288b53f741d9c16bd4a300c Author: Ceki Gulcu <ceki@qos.ch> Date: Tue Oct 19 17:55:24 2010 +0200 ongoing work diff --git a/logback-core/src/main/java/ch/qos/logback/core/status/OnConsoleStatusListener.java b/logback-core/src/main/java/ch/qos/logback/core/status/OnConsoleStatusListener.java index 9b6ea49..9c1bbbd 100644 --- a/logback-core/src/main/java/ch/qos/logback/core/status/OnConsoleStatusListener.java +++ b/logback-core/src/main/java/ch/qos/logback/core/status/OnConsoleStatusListener.java @@ -13,20 +13,47 @@ */ package ch.qos.logback.core.status; +import ch.qos.logback.core.Context; +import ch.qos.logback.core.spi.ContextAware; +import ch.qos.logback.core.spi.ContextAwareBase; +import ch.qos.logback.core.spi.LifeCycle; import ch.qos.logback.core.util.StatusPrinter; +import java.util.List; + /** * Print all new incoming status messages on the console. - * - * @author Ceki Gülcü * + * @author Ceki Gülcü */ -public class OnConsoleStatusListener implements StatusListener { +public class OnConsoleStatusListener extends ContextAwareBase implements StatusListener, LifeCycle { + + + boolean isStarted = false; + + private void print(Status status) { + StringBuilder sb = new StringBuilder(); + StatusPrinter.buildStr(sb, "", status); + System.out.print(sb); + } + public void addStatusEvent(Status status) { + if (!isStarted) + return; + print(status); + } + + public void start() { + isStarted = true; + StatusManager sm = context.getStatusManager(); + List<Status>statusList = sm.getCopyOfStatusList(); + for(sta) + } + public void stop() { + isStarted = false; + } - public void addStatusEvent(Status status) { - StringBuilder sb = new StringBuilder(); - StatusPrinter.buildStr(sb, "", status); - System.out.print(sb); - } + public boolean isStarted() { + return isStarted; + } } ----------------------------------------------------------------------- Summary of changes: .../core/status/OnConsoleStatusListener.java | 43 ++++++++++++++++---- 1 files changed, 35 insertions(+), 8 deletions(-) hooks/post-receive -- Logback: the generic, reliable, fast and flexible logging framework.
participants (1)
-
git-noreply@pixie.qos.ch