logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1560602 [2/2] - in /logging/log4j/log4j2/trunk: log4j-api/src/main/java/org/apache/logging/log4j/ log4j-api/src/main/java/org/apache/logging/log4j/spi/ log4j-api/src/main/java/org/apache/logging/log4j/status/ log4j-api/src/test/java/org/ap...
Date Thu, 23 Jan 2014 07:25:08 GMT
Modified: logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java?rev=1560602&r1=1560601&r2=1560602&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java
Thu Jan 23 07:25:07 2014
@@ -57,24 +57,27 @@ public class SLF4JLogger extends Abstrac
                 data.getParameters(), t);
         } else {
             switch (level) {
-                case DEBUG :
-                    logger.debug(getMarker(marker), data.getFormattedMessage(), data.getParameters(),
t);
-                    break;
-                case TRACE :
-                    logger.trace(getMarker(marker), data.getFormattedMessage(), data.getParameters(),
t);
-                    break;
-                case INFO :
-                    logger.info(getMarker(marker), data.getFormattedMessage(), data.getParameters(),
t);
-                    break;
-                case WARN :
-                    logger.warn(getMarker(marker), data.getFormattedMessage(), data.getParameters(),
t);
-                    break;
-                case ERROR :
-                    logger.error(getMarker(marker), data.getFormattedMessage(), data.getParameters(),
t);
-                    break;
-                default :
-                    logger.error(getMarker(marker), data.getFormattedMessage(), data.getParameters(),
t);
-                    break;
+            case TRACE:
+                logger.trace(getMarker(marker), data.getFormattedMessage(), data.getParameters(),
t);
+                break;
+            case VERBOSE:
+            case DEBUG:
+            case DIAG:
+                logger.debug(getMarker(marker), data.getFormattedMessage(), data.getParameters(),
t);
+                break;
+            case INFO:
+            case NOTICE:
+                logger.info(getMarker(marker), data.getFormattedMessage(), data.getParameters(),
t);
+                break;
+            case WARN:
+                logger.warn(getMarker(marker), data.getFormattedMessage(), data.getParameters(),
t);
+                break;
+            case ERROR:
+                logger.error(getMarker(marker), data.getFormattedMessage(), data.getParameters(),
t);
+                break;
+            default:
+                logger.error(getMarker(marker), data.getFormattedMessage(), data.getParameters(),
t);
+                break;
             }
         }
     }
@@ -94,18 +97,21 @@ public class SLF4JLogger extends Abstrac
 
     private int convertLevel(final Level level) {
         switch (level) {
-            case DEBUG :
-                return LocationAwareLogger.DEBUG_INT;
-            case TRACE :
-                return LocationAwareLogger.TRACE_INT;
-            case INFO :
-                return LocationAwareLogger.INFO_INT;
-            case WARN :
-                return LocationAwareLogger.WARN_INT;
-            case ERROR :
-                return LocationAwareLogger.ERROR_INT;
-            default :
-                return LocationAwareLogger.ERROR_INT;
+        case TRACE:
+            return LocationAwareLogger.TRACE_INT;
+        case VERBOSE:
+        case DEBUG:
+        case DIAG:
+            return LocationAwareLogger.DEBUG_INT;
+        case INFO:
+        case NOTICE:
+            return LocationAwareLogger.INFO_INT;
+        case WARN:
+            return LocationAwareLogger.WARN_INT;
+        case ERROR:
+            return LocationAwareLogger.ERROR_INT;
+        default:
+            return LocationAwareLogger.ERROR_INT;
         }
     }
 
@@ -137,19 +143,21 @@ public class SLF4JLogger extends Abstrac
     private boolean isEnabledFor(final Level level, final Marker marker) {
         final org.slf4j.Marker slf4jMarker = getMarker(marker);
         switch (level) {
-            case DEBUG :
-                return logger.isDebugEnabled(slf4jMarker);
-            case TRACE :
-                return logger.isTraceEnabled(slf4jMarker);
-            case INFO :
-                return logger.isInfoEnabled(slf4jMarker);
-            case WARN :
-                return logger.isWarnEnabled(slf4jMarker);
-            case ERROR :
-                return logger.isErrorEnabled(slf4jMarker);
-            default :
-                return logger.isErrorEnabled(slf4jMarker);
-
+        case TRACE:
+            return logger.isTraceEnabled(slf4jMarker);
+        case VERBOSE:
+        case DEBUG:
+        case DIAG:
+            return logger.isDebugEnabled(slf4jMarker);
+        case INFO:
+        case NOTICE:
+            return logger.isInfoEnabled(slf4jMarker);
+        case WARN:
+            return logger.isWarnEnabled(slf4jMarker);
+        case ERROR:
+            return logger.isErrorEnabled(slf4jMarker);
+        default:
+            return logger.isErrorEnabled(slf4jMarker);
         }
     }
 



Mime
View raw message