Author: ceki
Date: Tue Jul 5 13:13:52 2005
New Revision: 111
Modified:
nlog4j/trunk/build.xml
nlog4j/trunk/src/java/org/apache/log4j/Category.java
nlog4j/trunk/src/xdocs/changes.xml
Log:
Changes in to the signatire of void log(String callerFQCN, Priority level,
Object message, Throwable t) method in o.a.l.Category in order to retain
compatibility with JCL.
Release of NLOG4J 1.2.14.
Modified: nlog4j/trunk/build.xml
==============================================================================
--- nlog4j/trunk/build.xml (original)
+++ nlog4j/trunk/build.xml Tue Jul 5 13:13:52 2005
@@ -10,7 +10,7 @@
<!-- prefixed with "env". -->
<property environment="env"/>
- <property name="version" value="1.2.13"/>
+ <property name="version" value="1.2.14"/>
<!-- The base directory relative to which most targets are built -->
<property name="base" value="."/>
Modified: nlog4j/trunk/src/java/org/apache/log4j/Category.java
==============================================================================
--- nlog4j/trunk/src/java/org/apache/log4j/Category.java (original)
+++ nlog4j/trunk/src/java/org/apache/log4j/Category.java Tue Jul 5
13:13:52 2005
@@ -908,12 +908,16 @@
@param message The message of the logging request.
@param t The throwable of the logging request, may be null. */
public
- void log(String callerFQCN, Priority level, String message, Throwable t) {
+ void log(String callerFQCN, Priority level, Object message, Throwable t) {
if(repository.isDisabled(level.level)) {
return;
}
if(level.isGreaterOrEqual(this.getEffectiveLevel())) {
- forcedLog(callerFQCN, level, message, t);
+ if(message instanceof String) {
+ forcedLog(callerFQCN, level, message, t);
+ } else {
+ forcedLog(callerFQCN, level, message.toString(), t);
+ }
}
}
Modified: nlog4j/trunk/src/xdocs/changes.xml
==============================================================================
--- nlog4j/trunk/src/xdocs/changes.xml (original)
+++ nlog4j/trunk/src/xdocs/changes.xml Tue Jul 5 13:13:52 2005
@@ -53,6 +53,28 @@
</section>
+ <section name="Changes in NLOG4J 1.2.14">
+ <p>Nick Faiz from the Apache Directory project reported
+ compatibility issues with NLOG4J when used in conjunction with
+ Jakarta Commons Logging.
+ </p>
+
+ <p>As mentioned above, while printing methods in log4j take an
+ argument of type <code>java.lang.Object</code>, the
+ <code>org.slf4j.Logger</code> interface imposes that this
+ parameter be of type <code>java.lang.String</code>. NLOG4J
+ Logger's which directly implement the
+ <code>org.slf4j.Logger</code> interface relays this restriction.
+ </p>
+
+ <p>Luckily, JCL uses a special printing method which lies beyond
+ those in the <code>org.slf4j.Logger</code> interface. NLOG4J
+ release 1.2.14 modifies this special printing method so to retain
+ compatibility with JCL while still adhering to the SLF4J Logger
+ interface.
+ </p>
+ </section>
+
<section name="Changes in NLOG4J 1.2.13">
_______________________________________________
nlog4j-dev mailing list
[EMAIL PROTECTED]
http://slf4j.org/mailman/listinfo/nlog4j-dev