You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2016/01/26 05:43:59 UTC

logging-log4j2 git commit: LOG4J2-124 - Rename ShutdownCapable interface to Terminable

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 01626e25b -> 0832abc15


LOG4J2-124 - Rename ShutdownCapable interface to Terminable


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

Branch: refs/heads/master
Commit: 0832abc1509c0e4080d7cac1e23ace6149b0a9df
Parents: 01626e2
Author: Ralph Goers <rg...@nextiva.com>
Authored: Mon Jan 25 21:43:45 2016 -0700
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Mon Jan 25 21:43:45 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/logging/log4j/LogManager.java  |  6 +++---
 .../apache/logging/log4j/spi/ShutdownCapable.java  | 17 -----------------
 .../org/apache/logging/log4j/spi/Terminable.java   | 17 +++++++++++++++++
 .../apache/logging/log4j/core/LoggerContext.java   |  8 ++++----
 4 files changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0832abc1/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java b/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
index 8fdb718..086a065 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
@@ -27,7 +27,7 @@ import org.apache.logging.log4j.simple.SimpleLoggerContextFactory;
 import org.apache.logging.log4j.spi.LoggerContext;
 import org.apache.logging.log4j.spi.LoggerContextFactory;
 import org.apache.logging.log4j.spi.Provider;
-import org.apache.logging.log4j.spi.ShutdownCapable;
+import org.apache.logging.log4j.spi.Terminable;
 import org.apache.logging.log4j.status.StatusLogger;
 import org.apache.logging.log4j.util.LoaderUtil;
 import org.apache.logging.log4j.util.PropertiesUtil;
@@ -315,8 +315,8 @@ public class LogManager {
      * @since 2.6
      */
     public static void shutdown(LoggerContext context) {
-        if (context != null && context instanceof ShutdownCapable) {
-            ((ShutdownCapable) context).shutdown();
+        if (context != null && context instanceof Terminable) {
+            ((Terminable) context).terminate();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0832abc1/log4j-api/src/main/java/org/apache/logging/log4j/spi/ShutdownCapable.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/spi/ShutdownCapable.java b/log4j-api/src/main/java/org/apache/logging/log4j/spi/ShutdownCapable.java
deleted file mode 100644
index a46ef60..0000000
--- a/log4j-api/src/main/java/org/apache/logging/log4j/spi/ShutdownCapable.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright (c) 2016 Nextiva, Inc. to Present.
- * All rights reserved.
- */
-package org.apache.logging.log4j.spi;
-
-/**
- * Interface to be implemented by LoggerContext's that provide a shutdown method.
- * @since 2.6
- */
-public interface ShutdownCapable {
-
-    /**
-     * Requests that the logging implementation shut down.
-     */
-    void shutdown();
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0832abc1/log4j-api/src/main/java/org/apache/logging/log4j/spi/Terminable.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/spi/Terminable.java b/log4j-api/src/main/java/org/apache/logging/log4j/spi/Terminable.java
new file mode 100644
index 0000000..53ed313
--- /dev/null
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/spi/Terminable.java
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2016 Nextiva, Inc. to Present.
+ * All rights reserved.
+ */
+package org.apache.logging.log4j.spi;
+
+/**
+ * Interface to be implemented by LoggerContext's that provide a shutdown method.
+ * @since 2.6
+ */
+public interface Terminable {
+
+    /**
+     * Requests that the logging implementation shut down.
+     */
+    void terminate();
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0832abc1/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
index fcdfc16..8e19936 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java
@@ -45,7 +45,7 @@ import org.apache.logging.log4j.message.MessageFactory;
 import org.apache.logging.log4j.spi.AbstractLogger;
 import org.apache.logging.log4j.spi.LoggerContextFactory;
 import org.apache.logging.log4j.spi.LoggerContextKey;
-import org.apache.logging.log4j.spi.ShutdownCapable;
+import org.apache.logging.log4j.spi.Terminable;
 
 import static org.apache.logging.log4j.core.util.ShutdownCallbackRegistry.*;
 
@@ -54,8 +54,8 @@ import static org.apache.logging.log4j.core.util.ShutdownCallbackRegistry.*;
  * applications and a reference to the Configuration. The Configuration will contain the configured loggers, appenders,
  * filters, etc and will be atomically updated whenever a reconfigure occurs.
  */
-public class LoggerContext extends AbstractLifeCycle implements org.apache.logging.log4j.spi.LoggerContext,
-        ShutdownCapable, ConfigurationListener {
+public class LoggerContext extends AbstractLifeCycle implements org.apache.logging.log4j.spi.LoggerContext, Terminable,
+        ConfigurationListener {
 
     /**
      * Property name of the property change event fired if the configuration is changed.
@@ -279,7 +279,7 @@ public class LoggerContext extends AbstractLifeCycle implements org.apache.loggi
     }
 
     @Override
-    public void shutdown() {
+    public void terminate() {
         stop();
     }