garydgregory commented on a change in pull request #789:
URL: https://github.com/apache/logging-log4j2/pull/789#discussion_r824934255
##########
File path: log4j-1.2-api/src/main/java/org/apache/log4j/Level.java
##########
@@ -48,50 +49,50 @@
* The <code>OFF</code> has the highest possible rank and is
* intended to turn off logging.
*/
- public static final Level OFF = new Level(OFF_INT, "OFF", 0);
+ public static final Level OFF = new Level(OFF_INT, "OFF", 0,
org.apache.logging.log4j.Level.OFF);
/**
* The <code>FATAL</code> level designates very severe error
* events that will presumably lead the application to abort.
*/
- public static final Level FATAL = new Level(FATAL_INT, "FATAL", 0);
+ public static final Level FATAL = new Level(FATAL_INT, "FATAL", 0,
org.apache.logging.log4j.Level.FATAL);
/**
* The <code>ERROR</code> level designates error events that
* might still allow the application to continue running.
*/
- public static final Level ERROR = new Level(ERROR_INT, "ERROR", 3);
+ public static final Level ERROR = new Level(ERROR_INT, "ERROR", 3,
org.apache.logging.log4j.Level.ERROR);
/**
* The <code>WARN</code> level designates potentially harmful situations.
*/
- public static final Level WARN = new Level(WARN_INT, "WARN", 4);
+ public static final Level WARN = new Level(WARN_INT, "WARN", 4,
org.apache.logging.log4j.Level.WARN);
/**
* The <code>INFO</code> level designates informational messages
* that highlight the progress of the application at coarse-grained
* level.
*/
- public static final Level INFO = new Level(INFO_INT, "INFO", 6);
+ public static final Level INFO = new Level(INFO_INT, "INFO", 6,
org.apache.logging.log4j.Level.INFO);
/**
* The <code>DEBUG</code> Level designates fine-grained
* informational events that are most useful to debug an
* application.
*/
- public static final Level DEBUG = new Level(DEBUG_INT, "DEBUG", 7);
+ public static final Level DEBUG = new Level(DEBUG_INT, "DEBUG", 7,
org.apache.logging.log4j.Level.DEBUG);
/**
* The <code>TRACE</code> Level designates finer-grained
* informational events than the <code>DEBUG</code> level.
*/
- public static final Level TRACE = new Level(TRACE_INT, "TRACE", 7);
+ public static final Level TRACE = new Level(TRACE_INT, "TRACE", 7,
org.apache.logging.log4j.Level.TRACE);
Review comment:
I like this solution because it makes the correspondence between version
1 and 2 levels obvious, especially because of the surprising difference in the
level number order.
##########
File path: log4j-1.2-api/src/main/java/org/apache/log4j/Level.java
##########
@@ -48,50 +49,50 @@
* The <code>OFF</code> has the highest possible rank and is
* intended to turn off logging.
*/
- public static final Level OFF = new Level(OFF_INT, "OFF", 0);
+ public static final Level OFF = new Level(OFF_INT, "OFF", 0,
org.apache.logging.log4j.Level.OFF);
/**
* The <code>FATAL</code> level designates very severe error
* events that will presumably lead the application to abort.
*/
- public static final Level FATAL = new Level(FATAL_INT, "FATAL", 0);
+ public static final Level FATAL = new Level(FATAL_INT, "FATAL", 0,
org.apache.logging.log4j.Level.FATAL);
/**
* The <code>ERROR</code> level designates error events that
* might still allow the application to continue running.
*/
- public static final Level ERROR = new Level(ERROR_INT, "ERROR", 3);
+ public static final Level ERROR = new Level(ERROR_INT, "ERROR", 3,
org.apache.logging.log4j.Level.ERROR);
/**
* The <code>WARN</code> level designates potentially harmful situations.
*/
- public static final Level WARN = new Level(WARN_INT, "WARN", 4);
+ public static final Level WARN = new Level(WARN_INT, "WARN", 4,
org.apache.logging.log4j.Level.WARN);
/**
* The <code>INFO</code> level designates informational messages
* that highlight the progress of the application at coarse-grained
* level.
*/
- public static final Level INFO = new Level(INFO_INT, "INFO", 6);
+ public static final Level INFO = new Level(INFO_INT, "INFO", 6,
org.apache.logging.log4j.Level.INFO);
/**
* The <code>DEBUG</code> Level designates fine-grained
* informational events that are most useful to debug an
* application.
*/
- public static final Level DEBUG = new Level(DEBUG_INT, "DEBUG", 7);
+ public static final Level DEBUG = new Level(DEBUG_INT, "DEBUG", 7,
org.apache.logging.log4j.Level.DEBUG);
/**
* The <code>TRACE</code> Level designates finer-grained
* informational events than the <code>DEBUG</code> level.
*/
- public static final Level TRACE = new Level(TRACE_INT, "TRACE", 7);
+ public static final Level TRACE = new Level(TRACE_INT, "TRACE", 7,
org.apache.logging.log4j.Level.TRACE);
Review comment:
I like this solution because it makes the correspondence between version
1 and 2 levels obvious, especially because of the surprising difference in the
level number order.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]