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]> 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>
