logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikael Ståldal <mikael.stal...@magine.com>
Subject Re: 2.6 is not source compatible with 2.5
Date Mon, 30 May 2016 08:33:29 GMT
What is the use case for null as first parameter to a logger method?

On Sun, May 29, 2016 at 6:53 PM, Gary Gregory <garydgregory@gmail.com>
wrote:

> We are going to need to update the release notes and/or site for 2.6 to
> note that the 2.6 is not source compatible with previous releases. I tested
> going from 2.5 to 2.6 at work and got:
>
> [ERROR] COMPILATION ERROR :
> [INFO] -------------------------------------------------------------
> [ERROR] /E:/vcs/svn/...XYZ..:[155,15] reference to error is ambiguous
>   both method
> error(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object) in
> org.apache.logging.log4j.Logger and method
> error(java.lang.String,java.lang.Object,java.lang.Object) in
> org.apache.logging.log4j.Logger match
> [ERROR] /E:/vcs/svn/...XYZ...:[395,15] reference to trace is ambiguous
>   both method
> trace(org.apache.logging.log4j.Marker,java.lang.String,java.lang.Object) in
> org.apache.logging.log4j.Logger and method
> trace(java.lang.String,java.lang.Object,java.lang.Object) in
> org.apache.logging.log4j.Logger match
> [INFO] 2 errors
>
> with source code like:
>
>     public void xyz(final String message, final Throwable t) {
>         ...
>         logger.error(null, message, t);
>         ...
>         logger.trace(null, message, t);
>         ...
>     }
>
> Next time, I'll remember to test with a "real" client.
>
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Mime
View raw message