+1 Remko
On Sunday, August 11, 2013, Henning Schmiedehausen wrote: > Hi, > > I was toying with the log4j 2 API for a new project and I stumbled over > the fact that it uses a generic for Appender<T> without actually being > generic. The only generic part is the Layout. So as a result there is this > weird construct of Appender<SomeSerializableType> which is actually > dictated by the layout in use. > > This leads to really interesting constructs such as > > public abstract class AbstractDatabaseAppender<T extends > AbstractDatabaseManager> extends AbstractAppender<LogEvent> > > I was wondering whether this is necessary as it makes the API very > cumbersome to use and read so I removed the generic from Appender and > subsequently went through the log4j 2 code base and mostly removed stuff > that was no longer needed once that was gone. The result is at > > https://github.com/apache/logging-log4j2/pull/1 > > I will also file a JIRA for this. > > I know that the 2.0 release should be coming soon (being at beta8), but I > feel that making that change in the API before it is set in stone with 2.0 > woulc be really beneficial for anyone who wants to port code to 2.0 / write > new code. > > Thanks for considering, > Henning >
