diff --git a/log4j-over-slf4j/src/main/java/org/apache/log4j/Category.java b/log4j-over-slf4j/src/main/java/org/apache/log4j/Category.java index c85e7b26..279111e0 100644 --- a/log4j-over-slf4j/src/main/java/org/apache/log4j/Category.java +++ b/log4j-over-slf4j/src/main/java/org/apache/log4j/Category.java @@ -31,8 +31,7 @@ import org.slf4j.spi.LocationAwareLogger; * Log4j's trace, debug(), info(), * warn(), error() printing methods are directly * mapped to their SLF4J equivalents. Log4j's fatal() printing - * method is mapped to SLF4J's error() method with a FATAL - * marker. + * method is mapped to SLF4J's error() method with a FATAL marker. * * @author Sébastien Pennec * @author Ceki Gülcü @@ -148,7 +147,7 @@ public class Category { * SLF4J equivalent, except for FATAL which is mapped as ERROR. * * @param p - * the priority to check against + * the priority to check against * @return true if this logger is enabled for the given level, false * otherwise. */ @@ -281,30 +280,22 @@ public class Category { LocationAwareLogger.ERROR_INT, message, t); } - + // See also http://bugzilla.slf4j.org/show_bug.cgi?id=168 public void log(String FQCN, Priority p, Object msg, Throwable t) { int levelInt = priorityToLevelInt(p); - if (locationAwareLogger != null) { - locationAwareLogger.log(null, FQCN, levelInt, convertToString(msg), t); - } else { - throw new UnsupportedOperationException("The logger [" + slf4jLogger - + "] does not seem to be location aware."); - } + differentiatedLog(null, FQCN, levelInt, msg, t); } public void log(Priority p, Object message, Throwable t) { int levelInt = priorityToLevelInt(p); - differentiatedLog(null, CATEGORY_FQCN, levelInt, - message, t); + differentiatedLog(null, CATEGORY_FQCN, levelInt, message, t); } public void log(Priority p, Object message) { int levelInt = priorityToLevelInt(p); - differentiatedLog(null, CATEGORY_FQCN, levelInt, - message, null); + differentiatedLog(null, CATEGORY_FQCN, levelInt, message, null); } - private int priorityToLevelInt(Priority p) { switch (p.level) { case Level.TRACE_INT: diff --git a/slf4j-site/src/site/pages/index.html b/slf4j-site/src/site/pages/index.html index 28058853..0aea6bbd 100644 --- a/slf4j-site/src/site/pages/index.html +++ b/slf4j-site/src/site/pages/index.html @@ -46,6 +46,110 @@ href="legacy.html">legacy APIs.

+

Projects depending on SLF4J

+ +

Here is a non-exhaustive list of projects known to depend on + SLF4J, in alphabetical order: +

+ + + + + + + + + + + + + + + + + + + +
+ + + + + + +
+ + + + + +
diff --git a/slf4j-site/src/site/pages/news.html b/slf4j-site/src/site/pages/news.html index 924b0583..8b043278 100644 --- a/slf4j-site/src/site/pages/news.html +++ b/slf4j-site/src/site/pages/news.html @@ -25,6 +25,19 @@ announce mailing list.

+
+ +

March xx, 2010 - Release of SLF4J 1.5.11

+ +

Fixed bug + 168. In case log4j-over-slf4j is used and a logback appender + requires a third party library which depends on log4j, the + log(String FQCN, Priority p, Object msg, Throwable t) + method in log4j-over-slf4j's Categotry class would throw an + UnsupportedOperationException. Problem reported by Seth + Call.

+ +

December 3rd, 2009 - Release of SLF4J 1.5.10