You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2015/12/21 16:14:28 UTC
logging-log4j2 git commit: LOG4J2-1080 clarify what it means for a
level to be more/less specific than another level
Repository: logging-log4j2
Updated Branches:
refs/heads/master 13b0dd879 -> 4987c67c1
LOG4J2-1080 clarify what it means for a level to be more/less specific than another level
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4987c67c
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4987c67c
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4987c67c
Branch: refs/heads/master
Commit: 4987c67c12e43f081853f76042293899b72a9551
Parents: 13b0dd8
Author: rpopma <rp...@apache.org>
Authored: Tue Dec 22 00:14:20 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Tue Dec 22 00:14:20 2015 +0900
----------------------------------------------------------------------
.../main/java/org/apache/logging/log4j/Level.java | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4987c67c/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/Level.java b/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
index 32d0ab5..4375118 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/Level.java
@@ -158,6 +158,11 @@ public final class Level implements Comparable<Level>, Serializable {
/**
* Compares this level against the level passed as an argument and returns true if this level is the same or is less
* specific.
+ * <p>
+ * Concretely, {@link #TRACE} is less specific than {@link #DEBUG}, which is less specific than {@link #INFO},
+ * etc., until {@link #FATAL}, and finally {@link #OFF}, which is the most specific standard level.
+ * The least specific level is {@link #ALL}.
+ * </p>
*
* @param level The level to test.
* @return True if this level Level is less specific or the same as the given Level.
@@ -169,6 +174,11 @@ public final class Level implements Comparable<Level>, Serializable {
/**
* Compares this level against the level passed as an argument and returns true if this level is the same or is more
* specific.
+ * <p>
+ * Concretely, {@link #FATAL} is more specific than {@link #ERROR}, which is more specific than {@link #WARN},
+ * etc., until {@link #TRACE}, and finally {@link #ALL}, which is the least specific standard level.
+ * The most specific level is {@link #OFF}.
+ * </p>
*
* @param level The level to test.
* @return True if this level Level is more specific or the same as the given Level.
@@ -220,7 +230,7 @@ public final class Level implements Comparable<Level>, Serializable {
/**
* Retrieves an existing Level or creates on if it didn't previously exist.
- *
+ *
* @param name The name of the level.
* @param intValue The integer value for the Level. If the level was previously created this value is ignored.
* @return The Level.
@@ -241,7 +251,7 @@ public final class Level implements Comparable<Level>, Serializable {
/**
* Return the Level associated with the name or null if the Level cannot be found.
- *
+ *
* @param name The name of the Level.
* @return The Level or null.
*/
@@ -278,7 +288,7 @@ public final class Level implements Comparable<Level>, Serializable {
/**
* Return an array of all the Levels that have been registered.
- *
+ *
* @return An array of Levels.
*/
public static Level[] values() {
@@ -288,7 +298,7 @@ public final class Level implements Comparable<Level>, Serializable {
/**
* Return the Level associated with the name.
- *
+ *
* @param name The name of the Level to return.
* @return The Level.
* @throws java.lang.NullPointerException if the Level name is {@code null}.