Skip to content

Commit 2aec4d8

Browse files
committed
SLF4J-165 Handling of unknown (custom) priorities is different than in log4j (throwing an IllegalStateException than using the effective level of the given Priority / Level / Category)
1 parent 19e36ff commit 2aec4d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

log4j-over-slf4j/src/main/java/org/apache/log4j/Category.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ private int priorityToLevelInt(Priority p) {
323323
case Priority.FATAL_INT:
324324
return LocationAwareLogger.ERROR_INT;
325325
default:
326-
throw new IllegalStateException("Unknown Priority " + p);
326+
slf4jLogger.warn("Unknown Priority " + p);
327+
return LocationAwareLogger.TRACE_INT;
327328
}
328329
}
329330

0 commit comments

Comments
 (0)