While that is true, if an application uses our Logger API and recompiles and 
they actually use one of the new methods there will be a problem when they run 
with the other Logger implementation.  So, yes it would be compatible if all 
they do is upgrade the log4j version and don’t leverage any of the new methods. 
 

So while adding methods is not prohibited we really need to weigh the 
consequences when we do it.

Ralph

> On Mar 21, 2015, at 12:11 PM, Gary Gregory <[email protected]> wrote:
> 
> Hm... I think I'll use the stock throwing() API and its underlying stock 
> THROWING marker. 
> 
> I won't worry about possible future issues now, YAGNI!
> 
> WRT adding methods to log4j-api interfaces, it sounds like would be locked 
> out from doing so until 3.0 BUT look at 
> http://docs.oracle.com/javase/specs/jls/se6/html/binaryComp.html 
> <http://docs.oracle.com/javase/specs/jls/se6/html/binaryComp.html>:
> 
> "... binary compatible changes that the Java programming language supports"
> ...
> "Adding new fields, methods, or constructors to an existing class or 
> interface."
> 
> Source compatibility is a different story.
> 
> Gary
> 
> On Fri, Mar 20, 2015 at 11:07 PM, Ralph Goers <[email protected] 
> <mailto:[email protected]>> wrote:
> If you add those methods and someone is implementing their own Logger without 
> extending AbstractLogger then they will have a problem (i.e. - you are 
> breaking binary compatibility). Also, how are you going to implement 
> error(Marker, Throwable)?  logMessage requires the message parameter. It will 
> either construct a Message or it expects one, so you might as well be doing 
> error(Marker, “”, Throwable).
> 
> I guess I would also argue that not using the THROWING marker would break the 
> expected behavior of the call as is documented at 
> http://logging.apache.org/log4j/2.x/manual/flowtracing.html 
> <http://logging.apache.org/log4j/2.x/manual/flowtracing.html>. If you want to 
> use your own Marker you might as well call error().
> 
> Ralph
> 
>> On Mar 20, 2015, at 7:19 PM, Gary Gregory <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> And now I'd also like to have a 
>> org.apache.logging.log4j.Logger.throwing(Throwable, Marker) so I can provide 
>> my own marker instead of the canned one.
>> 
>> Thoughts on that?
>> 
>> Gary
>> 
>> On Fri, Mar 20, 2015 at 3:35 PM, Gary Gregory <[email protected] 
>> <mailto:[email protected]>> wrote:
>> I need:
>> 
>> org.apache.logging.log4j.Logger.error(Marker, Throwable)
>> 
>> But we have:
>> 
>> org.apache.logging.log4j.Logger.error(Marker, String, Throwable)
>> 
>> Thoughts on adding the new APIs (for all levels)?
>> 
>> Gary
>> 
>> -- 
>> E-Mail: [email protected] <mailto:[email protected]> | 
>> [email protected]  <mailto:[email protected]>
>> 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 <http://garygregory.wordpress.com/> 
>> Home: http://garygregory.com/ <http://garygregory.com/>
>> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
>> 
>> 
>> -- 
>> E-Mail: [email protected] <mailto:[email protected]> | 
>> [email protected]  <mailto:[email protected]>
>> 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 <http://garygregory.wordpress.com/> 
>> Home: http://garygregory.com/ <http://garygregory.com/>
>> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
> 
> 
> 
> -- 
> E-Mail: [email protected] <mailto:[email protected]> | 
> [email protected]  <mailto:[email protected]>
> 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 <http://garygregory.wordpress.com/> 
> Home: http://garygregory.com/ <http://garygregory.com/>
> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>

Reply via email to