You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2015/08/27 21:27:52 UTC

logging-log4j2 git commit: Rename Configurator.setChildren() to setAllLevels().

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 920ebf7cc -> bc2f21a1a


Rename Configurator.setChildren() to setAllLevels().

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/bc2f21a1
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/bc2f21a1
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/bc2f21a1

Branch: refs/heads/master
Commit: bc2f21a1a27e3b9ccd343742140106c30ebeb19b
Parents: 920ebf7
Author: ggregory <gg...@apache.org>
Authored: Thu Aug 27 12:27:34 2015 -0700
Committer: ggregory <gg...@apache.org>
Committed: Thu Aug 27 12:27:34 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/logging/log4j/core/config/Configurator.java  | 2 +-
 .../src/test/java/org/apache/logging/log4j/core/LoggerTest.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bc2f21a1/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
index cb3d4ef..d1d83be 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
@@ -168,7 +168,7 @@ public final class Configurator {
      * @param parentLogger the parent logger
      * @param level the new level
      */
-    public static void setChildren(final String parentLogger, final Level level) {
+    public static void setAllLevels(final String parentLogger, final Level level) {
         // 1) get logger config
         // 2) if exact match, use it, if not, create it.
         // 3) set level on logger config 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/bc2f21a1/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
index 81d7aa7..89f0b48 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
@@ -140,12 +140,12 @@ public class LoggerTest {
         loggerGrandchild.debug("Debug message 1 grandchild");
         final List<LogEvent> events = app.getEvents();
         assertEventCount(events, 3);
-        Configurator.setChildren(logger.getName(), Level.OFF);
+        Configurator.setAllLevels(logger.getName(), Level.OFF);
         logger.debug("Debug message 2");
         loggerChild.warn("Warn message 2 child");
         loggerGrandchild.fatal("Fatal message 2 grandchild");
         assertEventCount(events, 3);
-        Configurator.setChildren(logger.getName(), Level.DEBUG);
+        Configurator.setAllLevels(logger.getName(), Level.DEBUG);
         logger.debug("Debug message 3");
         loggerChild.warn("Trace message 3 child");
         loggerGrandchild.trace("Fatal message 3 grandchild");