[slf4j-dev] [GIT] SLF4J: Simple Logging Facade for Java branch, master, updated. v_1.6.1-16-g9d2796d
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Thu Dec 9 11:34:42 CET 2010
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 "SLF4J: Simple Logging Facade for Java".
The branch, master has been updated
via 9d2796d04333e3790cc6f8d30d0b003a34ff942a (commit)
from b6e0c251129fb0eb4da237cbb9a99517599b6f5d (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=slf4j.git;a=commit;h=9d2796d04333e3790cc6f8d30d0b003a34ff942a
http://github.com/ceki/slf4j/commit/9d2796d04333e3790cc6f8d30d0b003a34ff942a
commit 9d2796d04333e3790cc6f8d30d0b003a34ff942a
Author: Ceki Gulcu <ceki at qos.ch>
Date: Thu Dec 9 11:31:24 2010 +0100
added the isInstalled method to SLF4JBridgeHandler
diff --git a/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java b/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java
index 850b989..73f6373 100644
--- a/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java
+++ b/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java
@@ -140,6 +140,24 @@ public class SLF4JBridgeHandler extends Handler {
}
}
+ /**
+ * Returns true if SLF4JBridgeHandler has been previously installed, returns false otherwise.
+ * @return
+ * @throws SecurityException
+ */
+ public static boolean isInstalled() throws SecurityException {
+ java.util.logging.Logger rootLogger = LogManager.getLogManager().getLogger(
+ "");
+ Handler[] handlers = rootLogger.getHandlers();
+ for (int i = 0; i < handlers.length; i++) {
+ if (handlers[i] instanceof SLF4JBridgeHandler) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
/**
* Initialize this handler.
*
-----------------------------------------------------------------------
Summary of changes:
.../java/org/slf4j/bridge/SLF4JBridgeHandler.java | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
hooks/post-receive
--
SLF4J: Simple Logging Facade for Java
More information about the slf4j-dev
mailing list