First, we are talking about 6 lines of duplicated code. That isn't the kind of "opportunity" I spend a lot of time thinking about :-)
I recall writing DefaultErrorHandler fairly quickly - I don't think much thought went into it. Its primary goal is to try to reduce the number of duplicate error messages that are being logged internally. I'm sure the algorithm could be improved and having access to the LogEvent could help that. Ralph On May 29, 2013, at 8:05 AM, Gary Gregory wrote: > In org.apache.logging.log4j.core.appender.DefaultErrorHandler, error(String, > LogEvent, Throwable) looks the same as error(String, Throwable) > > Is that on purpose or the the LogEvent unused by mistake? Should it be > logged? Should it be saved in the exception? > > With the code as is, there seems to be an opportunity for refactoring common > code. > > Gary > > -- > E-Mail: [email protected] | [email protected] > Java Persistence with Hibernate, Second Edition > JUnit in Action, Second Edition > Spring Batch in Action > Blog: http://garygregory.wordpress.com > Home: http://garygregory.com/ > Tweet! http://twitter.com/GaryGregory
