You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Gary Gregory <ga...@gmail.com> on 2014/08/31 04:19:07 UTC

Fwd: [21/50] [abbrv] git commit: Revert "Convert Constants into an interface."

Well nevermind then :-)

Gary

<div>-------- Original message --------</div><div>From: mattsicker@apache.org </div><div>Date:08/30/2014  18:19  (GMT-05:00) </div><div>To: commits@logging.apache.org </div><div>Subject: [21/50] [abbrv] git commit: Revert "Convert Constants into an
  interface." </div><div>
</div>Revert "Convert Constants into an interface."

This reverts commit e7f2f43a715d8216f2d6fe78201e9e0adfacb606.

git-svn-id: https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk@1621040 13f79535-47bb-0310-9956-ffa450edef68


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

Branch: refs/heads/messaging-module
Commit: a801104552b6dbf961eab807d4c68054b88cc5de
Parents: f6b41b2
Author: mattsicker <ma...@unknown>
Authored: Thu Aug 28 05:21:49 2014 +0000
Committer: mattsicker <ma...@unknown>
Committed: Thu Aug 28 05:21:49 2014 +0000

----------------------------------------------------------------------
.../logging/log4j/core/util/Constants.java      | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a8011045/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Constants.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Constants.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Constants.java
index f5061be..20e47b6 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Constants.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Constants.java
@@ -21,32 +21,38 @@ import org.apache.logging.log4j.util.PropertiesUtil;
/**
  * Log4j Constants.
  */
-public interface Constants {
+public final class Constants {

     /**
      * Name of the system property to use to identify the LogEvent factory.
      */
-    String LOG4J_LOG_EVENT_FACTORY = "Log4jLogEventFactory";
+    public static final String LOG4J_LOG_EVENT_FACTORY = "Log4jLogEventFactory";

     /**
      * Name of the system property to use to identify the ContextSelector Class.
      */
-    String LOG4J_CONTEXT_SELECTOR = "Log4jContextSelector";
+    public static final String LOG4J_CONTEXT_SELECTOR = "Log4jContextSelector";

-    String LOG4J_DEFAULT_STATUS_LEVEL = "Log4jDefaultStatusLevel";
+    public static final String LOG4J_DEFAULT_STATUS_LEVEL = "Log4jDefaultStatusLevel";

     /**
      * JNDI context name string literal.
      */
-    String JNDI_CONTEXT_NAME = "java:comp/env/log4j/context-name";
+    public static final String JNDI_CONTEXT_NAME = "java:comp/env/log4j/context-name";

     /**
      * Line separator.
      */
-    String LINE_SEPARATOR = PropertiesUtil.getProperties().getStringProperty("line.separator", "\n");
+    public static final String LINE_SEPARATOR = PropertiesUtil.getProperties().getStringProperty("line.separator", "\n");

     /**
      * Number of milliseconds in a second.
      */
-    int MILLIS_IN_SECONDS = 1000;
+    public static final int MILLIS_IN_SECONDS = 1000;
+
+    /**
+     * Prevent class instantiation.
+     */
+    private Constants() {
+    }
}


Re: Fwd: [21/50] [abbrv] git commit: Revert "Convert Constants into an interface."

Posted by Matt Sicker <bo...@gmail.com>.
For some reason, merging master to another branch generated like a million
emails. Those are all commits that happened on the trunk. ;)


On 30 August 2014 21:19, Gary Gregory <ga...@gmail.com> wrote:

> Well nevermind then :-)
>
> Gary
>
>
> -------- Original message --------
> From: mattsicker@apache.org
> Date:08/30/2014 18:19 (GMT-05:00)
> To: commits@logging.apache.org
> Subject: [21/50] [abbrv] git commit: Revert "Convert Constants into an
> interface."
>
> Revert "Convert Constants into an interface."
>
> This reverts commit e7f2f43a715d8216f2d6fe78201e9e0adfacb606.
>
> git-svn-id:
> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk@1621040
> 13f79535-47bb-0310-9956-ffa450edef68
>
>
> Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
> Commit:
> http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/a8011045
> Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/a8011045
> Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/a8011045
>
> Branch: refs/heads/messaging-module
> Commit: a801104552b6dbf961eab807d4c68054b88cc5de
> Parents: f6b41b2
> Author: mattsicker <ma...@unknown>
> Authored: Thu Aug 28 05:21:49 2014 +0000
> Committer: mattsicker <ma...@unknown>
> Committed: Thu Aug 28 05:21:49 2014 +0000
>
> ----------------------------------------------------------------------
> .../logging/log4j/core/util/Constants.java      | 20 +++++++++++++-------
> 1 file changed, 13 insertions(+), 7 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/a8011045/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Constants.java
> ----------------------------------------------------------------------
> diff --git
> a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Constants.java
> b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Constants.java
> index f5061be..20e47b6 100644
> ---
> a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Constants.java
> +++
> b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/Constants.java
> @@ -21,32 +21,38 @@ import org.apache.logging.log4j.util.PropertiesUtil;
> /**
>   * Log4j Constants.
>   */
> -public interface Constants {
> +public final class Constants {
>
>      /**
>       * Name of the system property to use to identify the LogEvent
> factory.
>       */
> -    String LOG4J_LOG_EVENT_FACTORY = "Log4jLogEventFactory";
> +    public static final String LOG4J_LOG_EVENT_FACTORY =
> "Log4jLogEventFactory";
>
>      /**
>       * Name of the system property to use to identify the ContextSelector
> Class.
>       */
> -    String LOG4J_CONTEXT_SELECTOR = "Log4jContextSelector";
> +    public static final String LOG4J_CONTEXT_SELECTOR =
> "Log4jContextSelector";
>
> -    String LOG4J_DEFAULT_STATUS_LEVEL = "Log4jDefaultStatusLevel";
> +    public static final String LOG4J_DEFAULT_STATUS_LEVEL =
> "Log4jDefaultStatusLevel";
>
>      /**
>       * JNDI context name string literal.
>       */
> -    String JNDI_CONTEXT_NAME = "java:comp/env/log4j/context-name";
> +    public static final String JNDI_CONTEXT_NAME =
> "java:comp/env/log4j/context-name";
>
>      /**
>       * Line separator.
>       */
> -    String LINE_SEPARATOR =
> PropertiesUtil.getProperties().getStringProperty("line.separator", "\n");
> +    public static final String LINE_SEPARATOR =
> PropertiesUtil.getProperties().getStringProperty("line.separator", "\n");
>
>      /**
>       * Number of milliseconds in a second.
>       */
> -    int MILLIS_IN_SECONDS = 1000;
> +    public static final int MILLIS_IN_SECONDS = 1000;
> +
> +    /**
> +     * Prevent class instantiation.
> +     */
> +    private Constants() {
> +    }
> }
>
>


-- 
Matt Sicker <bo...@gmail.com>