Skip to content

Commit

Permalink
deprecate Level.ALL and javadocs for Level.OFF
Browse files Browse the repository at this point in the history
Signed-off-by: Ceki Gulcu <[email protected]>
  • Loading branch information
ceki committed Sep 21, 2024
1 parent 895d92d commit 6d11eff
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions logback-classic/src/main/java/ch/qos/logback/classic/Level.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ public final class Level implements java.io.Serializable {
public static final Integer ALL_INTEGER = ALL_INT;

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

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

/**
* The <code>ALL</code> is used to turn on all logging.
* <p>The <code>ALL</code> is used to turn on all logging. The <code>ALL</code> level is vestigial from
* log4j 1.x.
* </p>
*
* <p>In logback, where the Level class is final, logging can be turned on for all levels by setting
* a logger's level to <code>TRACE</code>.
* </p>
*
* <p>Thus, the <code>ALL</code> level is marked as deprecated.
* </p>
*
* @deprecated with no replacement
*/
public static final Level ALL = new Level(ALL_INT, "ALL");

Expand Down

0 comments on commit 6d11eff

Please sign in to comment.