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 2022/01/09 15:44:45 UTC

[logging-log4j2] branch master updated (0621056 -> 664893e)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.


    from 0621056  Add assumption guards for incompatible integration tests
     new 0f6d9d1  Sort members.
     new 664893e  Normalize Javadoc verb.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/logging/log4j/spi/LoggerContext.java    | 142 ++++++++++-----------
 1 file changed, 71 insertions(+), 71 deletions(-)

[logging-log4j2] 01/02: Sort members.

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 0f6d9d130ed20b86d5978604b9047d97c0903b29
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jan 9 10:36:48 2022 -0500

    Sort members.
---
 .../apache/logging/log4j/spi/LoggerContext.java    | 130 ++++++++++-----------
 1 file changed, 65 insertions(+), 65 deletions(-)

diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java b/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java
index 955bb34..2dd94d8 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java
@@ -30,6 +30,46 @@ public interface LoggerContext {
     Object getExternalContext();
 
     /**
+     * Returns an ExtendedLogger using the fully qualified name of the Class as the Logger name.
+     * @param cls The Class whose name should be used as the Logger name.
+     * @return The logger.
+     * @since 2.14.0
+     */
+    default ExtendedLogger getLogger(final Class<?> cls) {
+        final String canonicalName = cls.getCanonicalName();
+        return getLogger(canonicalName != null ? canonicalName : cls.getName());
+    }
+
+    /**
+     * Returns an ExtendedLogger using the fully qualified name of the Class as the Logger name.
+     * @param cls The Class whose name should be used as the Logger name.
+     * @param messageFactory The message factory is used only when creating a logger, subsequent use does not change the
+     *                       logger but will log a warning if mismatched.
+     * @return The logger.
+     * @since 2.14.0
+     */
+    default ExtendedLogger getLogger(final Class<?> cls, final MessageFactory messageFactory) {
+        final String canonicalName = cls.getCanonicalName();
+        return getLogger(canonicalName != null ? canonicalName : cls.getName(), messageFactory);
+    }
+
+    /**
+     * Returns an ExtendedLogger.
+     * @param name The name of the Logger to return.
+     * @return The logger with the specified name.
+     */
+    ExtendedLogger getLogger(String name);
+
+    /**
+     * Returns an ExtendedLogger.
+     * @param name The name of the Logger to return.
+     * @param messageFactory The message factory is used only when creating a logger, subsequent use does not change
+     *                       the logger but will log a warning if mismatched.
+     * @return The logger with the specified name.
+     */
+    ExtendedLogger getLogger(String name, MessageFactory messageFactory);
+
+    /**
      * Retrieve an object by its name.
      * @param key The object's key.
      * @return The Object that is associated with the key, if any.
@@ -40,6 +80,31 @@ public interface LoggerContext {
     }
 
     /**
+     * Detects if a Logger with the specified name exists.
+     * @param name The Logger name to search for.
+     * @return true if the Logger exists, false otherwise.
+     */
+    boolean hasLogger(String name);
+
+    /**
+     * Detects if a Logger with the specified name and MessageFactory type exists.
+     * @param name The Logger name to search for.
+     * @param messageFactoryClass The message factory class to search for.
+     * @return true if the Logger exists, false otherwise.
+     * @since 2.5
+     */
+    boolean hasLogger(String name, Class<? extends MessageFactory> messageFactoryClass);
+
+    /**
+     * Detects if a Logger with the specified name and MessageFactory exists.
+     * @param name The Logger name to search for.
+     * @param messageFactory The message factory to search for.
+     * @return true if the Logger exists, false otherwise.
+     * @since 2.5
+     */
+    boolean hasLogger(String name, MessageFactory messageFactory);
+
+    /**
      * Store an object into the LoggerContext by name for later use.
      * @param key The object's key.
      * @param value The object.
@@ -81,69 +146,4 @@ public interface LoggerContext {
     default boolean removeObject(final String key, final Object value) {
         return false;
     }
-
-    /**
-     * Returns an ExtendedLogger.
-     * @param name The name of the Logger to return.
-     * @return The logger with the specified name.
-     */
-    ExtendedLogger getLogger(String name);
-
-    /**
-     * Returns an ExtendedLogger using the fully qualified name of the Class as the Logger name.
-     * @param cls The Class whose name should be used as the Logger name.
-     * @return The logger.
-     * @since 2.14.0
-     */
-    default ExtendedLogger getLogger(final Class<?> cls) {
-        final String canonicalName = cls.getCanonicalName();
-        return getLogger(canonicalName != null ? canonicalName : cls.getName());
-    }
-
-    /**
-     * Returns an ExtendedLogger.
-     * @param name The name of the Logger to return.
-     * @param messageFactory The message factory is used only when creating a logger, subsequent use does not change
-     *                       the logger but will log a warning if mismatched.
-     * @return The logger with the specified name.
-     */
-    ExtendedLogger getLogger(String name, MessageFactory messageFactory);
-
-    /**
-     * Returns an ExtendedLogger using the fully qualified name of the Class as the Logger name.
-     * @param cls The Class whose name should be used as the Logger name.
-     * @param messageFactory The message factory is used only when creating a logger, subsequent use does not change the
-     *                       logger but will log a warning if mismatched.
-     * @return The logger.
-     * @since 2.14.0
-     */
-    default ExtendedLogger getLogger(final Class<?> cls, final MessageFactory messageFactory) {
-        final String canonicalName = cls.getCanonicalName();
-        return getLogger(canonicalName != null ? canonicalName : cls.getName(), messageFactory);
-    }
-
-    /**
-     * Detects if a Logger with the specified name exists.
-     * @param name The Logger name to search for.
-     * @return true if the Logger exists, false otherwise.
-     */
-    boolean hasLogger(String name);
-
-    /**
-     * Detects if a Logger with the specified name and MessageFactory exists.
-     * @param name The Logger name to search for.
-     * @param messageFactory The message factory to search for.
-     * @return true if the Logger exists, false otherwise.
-     * @since 2.5
-     */
-    boolean hasLogger(String name, MessageFactory messageFactory);
-
-    /**
-     * Detects if a Logger with the specified name and MessageFactory type exists.
-     * @param name The Logger name to search for.
-     * @param messageFactoryClass The message factory class to search for.
-     * @return true if the Logger exists, false otherwise.
-     * @since 2.5
-     */
-    boolean hasLogger(String name, Class<? extends MessageFactory> messageFactoryClass);
 }

[logging-log4j2] 02/02: Normalize Javadoc verb.

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 664893ed70793d1fa61cfbd619386079ba9c09e5
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jan 9 10:44:43 2022 -0500

    Normalize Javadoc verb.
---
 .../apache/logging/log4j/spi/LoggerContext.java    | 26 +++++++++++-----------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java b/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java
index 2dd94d8..ff438e4 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContext.java
@@ -24,13 +24,13 @@ import org.apache.logging.log4j.message.MessageFactory;
 public interface LoggerContext {
 
     /**
-     * An anchor for some other context, such as a ClassLoader or ServletContext.
+     * Gets the anchor for some other context, such as a ClassLoader or ServletContext.
      * @return The external context.
      */
     Object getExternalContext();
 
     /**
-     * Returns an ExtendedLogger using the fully qualified name of the Class as the Logger name.
+     * Gets an ExtendedLogger using the fully qualified name of the Class as the Logger name.
      * @param cls The Class whose name should be used as the Logger name.
      * @return The logger.
      * @since 2.14.0
@@ -41,7 +41,7 @@ public interface LoggerContext {
     }
 
     /**
-     * Returns an ExtendedLogger using the fully qualified name of the Class as the Logger name.
+     * Gets an ExtendedLogger using the fully qualified name of the Class as the Logger name.
      * @param cls The Class whose name should be used as the Logger name.
      * @param messageFactory The message factory is used only when creating a logger, subsequent use does not change the
      *                       logger but will log a warning if mismatched.
@@ -54,14 +54,14 @@ public interface LoggerContext {
     }
 
     /**
-     * Returns an ExtendedLogger.
+     * Gets an ExtendedLogger.
      * @param name The name of the Logger to return.
      * @return The logger with the specified name.
      */
     ExtendedLogger getLogger(String name);
 
     /**
-     * Returns an ExtendedLogger.
+     * Gets an ExtendedLogger.
      * @param name The name of the Logger to return.
      * @param messageFactory The message factory is used only when creating a logger, subsequent use does not change
      *                       the logger but will log a warning if mismatched.
@@ -70,7 +70,7 @@ public interface LoggerContext {
     ExtendedLogger getLogger(String name, MessageFactory messageFactory);
 
     /**
-     * Retrieve an object by its name.
+     * Gets an object by its name.
      * @param key The object's key.
      * @return The Object that is associated with the key, if any.
      * @since 2.13.0
@@ -80,14 +80,14 @@ public interface LoggerContext {
     }
 
     /**
-     * Detects if a Logger with the specified name exists.
+     * Tests if a Logger with the specified name exists.
      * @param name The Logger name to search for.
      * @return true if the Logger exists, false otherwise.
      */
     boolean hasLogger(String name);
 
     /**
-     * Detects if a Logger with the specified name and MessageFactory type exists.
+     * Tests if a Logger with the specified name and MessageFactory type exists.
      * @param name The Logger name to search for.
      * @param messageFactoryClass The message factory class to search for.
      * @return true if the Logger exists, false otherwise.
@@ -96,7 +96,7 @@ public interface LoggerContext {
     boolean hasLogger(String name, Class<? extends MessageFactory> messageFactoryClass);
 
     /**
-     * Detects if a Logger with the specified name and MessageFactory exists.
+     * Tests if a Logger with the specified name and MessageFactory exists.
      * @param name The Logger name to search for.
      * @param messageFactory The message factory to search for.
      * @return true if the Logger exists, false otherwise.
@@ -105,7 +105,7 @@ public interface LoggerContext {
     boolean hasLogger(String name, MessageFactory messageFactory);
 
     /**
-     * Store an object into the LoggerContext by name for later use.
+     * Associates an object into the LoggerContext by name for later use.
      * @param key The object's key.
      * @param value The object.
      * @return The previous object or null.
@@ -116,7 +116,7 @@ public interface LoggerContext {
     }
 
     /**
-     * Store an object into the LoggerContext by name for later use if an object is not already stored with that key.
+     * Associates an object into the LoggerContext by name for later use if an object is not already stored with that key.
      * @param key The object's key.
      * @param value The object.
      * @return The previous object or null.
@@ -127,7 +127,7 @@ public interface LoggerContext {
     }
 
     /**
-     * Remove an object if it is present.
+     * Removes an object if it is present.
      * @param key The object's key.
      * @return The object if it was present, null if it was not.
      * @since 2.13.0
@@ -137,7 +137,7 @@ public interface LoggerContext {
     }
 
     /**
-     * Remove an object if it is present and the provided object is stored.
+     * Removes an object if it is present and the provided object is stored.
      * @param key The object's key.
      * @param value The object.
      * @return The object if it was present, null if it was not.