Hi all,
If you try to compile log4j sources using ant (I'm using ant version 1.5.1) you will get a bunch of compiler errors about ambiguous method signatures. For example,
[javac] log4j-1.3\src\java\org\apache\log4j\net\XMLSocketNode.java:123:
reference to error is ambiguous, both method error(java.lang.Object,java.lang.Throwable)
in org.apache.log4j.Category and method error(java.lang.Object,java.lang.Object)
in org.apache.log4j.Logger match
These errors occur even if you are using JDK 1.4 (have not tried with 1.5). However, if you are using Eclipse with the default Compiler compliance level (which is 1.4), the code compiles fine.
To change the Compiler compliance level see Preferences->Java->Compiler->Compliance & Class files.
Anyway, the error can be corrected by merging the methods Logger.error(Object, Exception) and Logger.error(String, Object) into Logger.error(Object, Object).
I wonder how Sun changed the method resolution algorithm between 1.3 and 1.4.
-- Ceki Gülcü
The complete log4j manual: http://qos.ch/eclm
Professional log4j support: http://qos.ch/log4jSupport
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]