Skip to content
Browse files

[JBAS-8772] Prevent bypass of level check

  • Loading branch information...
1 parent cc3af78 commit 31fe9a0f0a161e57df571443643b7b4f91a9e95b @dmlloyd committed Dec 23, 2010
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/main/java/org/slf4j/impl/Slf4jLogger.java
View
8 src/main/java/org/slf4j/impl/Slf4jLogger.java
@@ -64,9 +64,11 @@ public void log(final Marker marker, final String fqcn, final int levelVal, fina
case LocationAwareLogger.ERROR_INT: level = org.jboss.logmanager.Level.ERROR; break;
default: level = org.jboss.logmanager.Level.DEBUG; break;
}
- final ExtLogRecord rec = new ExtLogRecord(level, message, fqcn);
- rec.setThrown(t);
- logger.logRaw(rec);
+ if (logger.isLoggable(level)) {
+ final ExtLogRecord rec = new ExtLogRecord(level, message, fqcn);
+ rec.setThrown(t);
+ logger.logRaw(rec);
+ }
}
/** {@inheritDoc} */

0 comments on commit 31fe9a0

Please sign in to comment.
Something went wrong with that request. Please try again.