Skip to content

Commit 6d11eff

Browse files
committed
deprecate Level.ALL and javadocs for Level.OFF
Signed-off-by: Ceki Gulcu <[email protected]>
1 parent 895d92d commit 6d11eff

File tree

1 file changed

+17
-2
lines changed
  • logback-classic/src/main/java/ch/qos/logback/classic

1 file changed

+17
-2
lines changed

logback-classic/src/main/java/ch/qos/logback/classic/Level.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ public final class Level implements java.io.Serializable {
4545
public static final Integer ALL_INTEGER = ALL_INT;
4646

4747
/**
48-
* The <code>OFF</code> is used to turn off logging.
48+
* The <code>OFF</code> is used to turn off logging. It is intended to be used
49+
* for logging system configuration.
50+
*
51+
* Warning: it should never be passed as an argument to logger methods
52+
* in a regular log statement.
4953
*/
5054
public static final Level OFF = new Level(OFF_INT, "OFF");
5155

@@ -79,7 +83,18 @@ public final class Level implements java.io.Serializable {
7983
public static final Level TRACE = new Level(TRACE_INT, "TRACE");
8084

8185
/**
82-
* The <code>ALL</code> is used to turn on all logging.
86+
* <p>The <code>ALL</code> is used to turn on all logging. The <code>ALL</code> level is vestigial from
87+
* log4j 1.x.
88+
* </p>
89+
*
90+
* <p>In logback, where the Level class is final, logging can be turned on for all levels by setting
91+
* a logger's level to <code>TRACE</code>.
92+
* </p>
93+
*
94+
* <p>Thus, the <code>ALL</code> level is marked as deprecated.
95+
* </p>
96+
*
97+
* @deprecated with no replacement
8398
*/
8499
public static final Level ALL = new Level(ALL_INT, "ALL");
85100

0 commit comments

Comments
 (0)