logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1580976 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
Date Mon, 24 Mar 2014 18:31:37 GMT
Author: ggregory
Date: Mon Mar 24 18:31:36 2014
New Revision: 1580976

URL: http://svn.apache.org/r1580976
Log:
Give me all your loggers, all your hugs and kisses too (guess the reference ;).

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java?rev=1580976&r1=1580975&r2=1580976&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
Mon Mar 24 18:31:36 2014
@@ -22,6 +22,7 @@ import java.io.File;
 import java.lang.ref.Reference;
 import java.lang.ref.SoftReference;
 import java.net.URI;
+import java.util.Collection;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -288,6 +289,19 @@ public class LoggerContext implements or
     }
 
     /**
+     * Gets a collection of the current loggers.
+     * <p>
+     * Whether this collection is a copy of the underlying collection or not is undefined.
Therefore, modify this collection at your own
+     * risk.
+     * </p>
+     * 
+     * @return a collection of the current loggers.
+     */
+    public Collection<Logger> getLoggers() {
+        return loggers.values();
+    }
+
+    /**
      * Obtain a Logger from the Context.
      * @param name The name of the Logger to return.
      * @param messageFactory The message factory is used only when creating a



Mime
View raw message