Then we need to add back the methods that were removed before a release can be performed.
Ralph > On Dec 30, 2020, at 5:40 PM, Gary Gregory <garydgreg...@gmail.com> wrote: > > On Wed, Dec 30, 2020 at 6:50 PM Ralph Goers <ralph.go...@dslextreme.com> > wrote: > >> I should add that I am fine with getting rid of "2" interfaces that are >> only used by users who are implementing their own customizations. We can >> document that. I'm also ok with getting rid of Supplier if we can show that >> no code change or compilation is required. I don't know if that is true >> with Lambdas. >> > > Hi All, > >> "no code change or compilation is required." > That sounds like a fantasy ;-) since we've already broken source and binary > compatibility in log4j-api with 2.x by removing deprecated methods, so > we're already in jar hell territory. So removing our custom Supplier and > folder "2" types should also be ok. > > mvn revapi:check -pl log4j-api -Drevapi.skip=false > > says: > > [ERROR] java.method.removed: method void > org.apache.logging.log4j.Logger::entry(): Method was removed. > [ERROR] java.method.removed: method void > org.apache.logging.log4j.Logger::entry(java.lang.Object[]): Method was > removed. > [ERROR] java.method.removed: method void > org.apache.logging.log4j.Logger::exit(): Method was removed. > [ERROR] java.method.removed: method <R> R > org.apache.logging.log4j.Logger::exit(R): Method was removed. > [ERROR] java.method.removed: method org.apache.logging.log4j.Marker > org.apache.logging.log4j.MarkerManager::getMarker(java.lang.String, > java.lang.String): Method was removed. > [ERROR] java.method.removed: method org.apache.logging.log4j.Marker > org.apache.logging.log4j.MarkerManager::getMarker(java.lang.String, > org.apache.logging.log4j.Marker): Method was removed. > [ERROR] java.class.noLongerInheritsFromClass: class > org.apache.logging.log4j.message.FormattedMessageFactory: Class no longer > inherits from 'org.apache.logging.log4j.message.AbstractMessageFactory'. > [ERROR] java.class.noLongerInheritsFromClass: class > org.apache.logging.log4j.message.LocalizedMessageFactory: Class no longer > inherits from 'org.apache.logging.log4j.message.AbstractMessageFactory'. > [ERROR] java.class.noLongerInheritsFromClass: class > org.apache.logging.log4j.message.MessageFormatMessageFactory: Class no > longer inherits from > 'org.apache.logging.log4j.message.AbstractMessageFactory'. > [ERROR] java.method.removed: method void > org.apache.logging.log4j.message.ParameterizedMessage::<init>(java.lang.String, > java.lang.String[], java.lang.Throwable): Method was removed. > [ERROR] java.class.noLongerInheritsFromClass: class > org.apache.logging.log4j.message.ParameterizedMessageFactory: Class no > longer inherits from > 'org.apache.logging.log4j.message.AbstractMessageFactory'. > [ERROR] java.class.noLongerInheritsFromClass: class > org.apache.logging.log4j.message.ParameterizedNoReferenceMessageFactory: > Class no longer inherits from > 'org.apache.logging.log4j.message.AbstractMessageFactory'. > [ERROR] java.class.noLongerInheritsFromClass: class > org.apache.logging.log4j.message.SimpleMessageFactory: Class no longer > inherits from 'org.apache.logging.log4j.message.AbstractMessageFactory'. > [ERROR] java.class.noLongerInheritsFromClass: class > org.apache.logging.log4j.message.StringFormatterMessageFactory: Class no > longer inherits from > 'org.apache.logging.log4j.message.AbstractMessageFactory'. > [ERROR] java.class.noLongerImplementsInterface: class > org.apache.logging.log4j.simple.SimpleLogger: Class no longer implements > interface 'org.apache.logging.log4j.spi.LocationAwareLogger'. > [ERROR] java.field.serialVersionUIDUnchanged: field > org.apache.logging.log4j.spi.AbstractLogger.serialVersionUID: The class > changed in an incompatible way with regards to serialization but the > serialVersionUID field stayed unchanged. This might be ok and/or desired > but is suspicious. > [ERROR] java.method.removed: method > org.apache.logging.log4j.message.EntryMessage > org.apache.logging.log4j.spi.AbstractLogger::enter(java.lang.String, > org.apache.logging.log4j.util.MessageSupplier): Method was removed. > [ERROR] java.method.removed: method > org.apache.logging.log4j.message.EntryMessage > org.apache.logging.log4j.spi.AbstractLogger::enter(java.lang.String, > java.lang.String, org.apache.logging.log4j.util.MessageSupplier[]): Method > was removed. > [ERROR] java.method.removed: method void > org.apache.logging.log4j.spi.AbstractLogger::entry(): Method was removed. > [ERROR] java.method.removed: method void > org.apache.logging.log4j.spi.AbstractLogger::entry(java.lang.Object[]): > Method was removed. > [ERROR] java.method.removed: method void > org.apache.logging.log4j.spi.AbstractLogger::exit(): Method was removed. > [ERROR] java.method.removed: method <R> R > org.apache.logging.log4j.spi.AbstractLogger::exit(R): Method was removed. > [ERROR] java.class.noLongerImplementsInterface: class > org.apache.logging.log4j.spi.AbstractLogger: Class no longer implements > interface 'org.apache.logging.log4j.spi.LocationAwareLogger'. > [ERROR] java.class.noLongerImplementsInterface: class > org.apache.logging.log4j.spi.ExtendedLoggerWrapper: Class no longer > implements interface 'org.apache.logging.log4j.spi.LocationAwareLogger'. > [ERROR] java.class.removed: interface > org.apache.logging.log4j.spi.LocationAwareLogger: Class was removed. > [ERROR] java.class.removed: class > org.apache.logging.log4j.spi.LoggerContextKey: Class was removed. > [ERROR] java.class.removed: class > org.apache.logging.log4j.spi.MessageFactory2Adapter: Class was removed. > [ERROR] java.class.noLongerImplementsInterface: class > org.apache.logging.log4j.status.StatusLogger: Class no longer implements > interface 'org.apache.logging.log4j.spi.LocationAwareLogger'. > [ERROR] java.class.removed: class org.apache.logging.log4j.util.Base64Util: > Class was removed. > [ERROR] java.class.removed: class > org.apache.logging.log4j.util.ProcessIdUtil: Class was removed. > [ERROR] java.method.removed: method void > org.apache.logging.log4j.util.ProviderUtil::loadProviders(java.util.Enumeration<java.net.URL>, > java.lang.ClassLoader): Method was removed. > [ERROR] java.annotation.added: interface org.osgi.framework.Bundle: Element > newly annotated with 'org.osgi.annotation.versioning.ProviderType'. > [org.osgi:org.osgi.core:jar:6.0.0] > [ERROR] java.method.addedToInterface: method <S> > org.osgi.framework.ServiceObjects<S> > org.osgi.framework.BundleContext::getServiceObjects(org.osgi.framework.ServiceReference<S>): > Method was added to an interface. [org.osgi:org.osgi.core:jar:6.0.0] > [ERROR] java.method.addedToInterface: method <S> > org.osgi.framework.ServiceRegistration<S> > org.osgi.framework.BundleContext::registerService(java.lang.Class<S>, > org.osgi.framework.ServiceFactory<S>, > java.util.Dictionary<java.lang.String, ?>): Method was added to an > interface. [org.osgi:org.osgi.core:jar:6.0.0] > [ERROR] java.annotation.added: interface org.osgi.framework.BundleContext: > Element newly annotated with 'org.osgi.annotation.versioning.ProviderType'. > [org.osgi:org.osgi.core:jar:6.0.0] > [ERROR] java.annotation.added: interface org.osgi.framework.BundleListener: > Element newly annotated with 'org.osgi.annotation.versioning.ConsumerType'. > [org.osgi:org.osgi.core:jar:6.0.0] > [ERROR] java.annotation.added: interface org.osgi.framework.Filter: Element > newly annotated with 'org.osgi.annotation.versioning.ProviderType'. > [org.osgi:org.osgi.core:jar:6.0.0] > [ERROR] java.annotation.added: interface > org.osgi.framework.FrameworkListener: Element newly annotated with > 'org.osgi.annotation.versioning.ConsumerType'. > [org.osgi:org.osgi.core:jar:6.0.0] > [ERROR] java.class.externalClassExposedInAPI: interface > org.osgi.framework.ServiceFactory<S>: A class from supplementary archives > is used in a public capacity in the API. [org.osgi:org.osgi.core:jar:6.0.0] > [ERROR] java.annotation.added: interface > org.osgi.framework.ServiceListener: Element newly annotated with > 'org.osgi.annotation.versioning.ConsumerType'. > [org.osgi:org.osgi.core:jar:6.0.0] > [ERROR] java.class.externalClassExposedInAPI: interface > org.osgi.framework.ServiceObjects<S>: A class from supplementary archives > is used in a public capacity in the API. [org.osgi:org.osgi.core:jar:6.0.0] > [ERROR] java.annotation.added: interface > org.osgi.framework.ServiceReference<S>: Element newly annotated with > 'org.osgi.annotation.versioning.ProviderType'. > [org.osgi:org.osgi.core:jar:6.0.0] > [ERROR] java.annotation.added: interface > org.osgi.framework.ServiceRegistration<S>: Element newly annotated with > 'org.osgi.annotation.versioning.ProviderType'. > [org.osgi:org.osgi.core:jar:6.0.0] > > Gary > > >> >> Ralph >> >> ----- Original Message ----- >> From: "ralph.goers @dslextreme.com" <ralph.go...@dslextreme.com> >> To: dev@logging.apache.org >> Sent: Wednesday, December 30, 2020 4:42:19 PM >> Subject: Re: Deleting log4j-layout-jackson* modules from master >> >> Changing package names would require every user of the Log4j API to have >> to change their code. We are not going to do that to our users. That is one >> of the reasons folks have stuck with Log4j 1.x for so long. I would be -1 >> on any changes that require that. >> >> Ralph >> >>> On Dec 30, 2020, at 2:47 PM, Gary Gregory <garydgreg...@gmail.com> >> wrote: >>> >>> Well. we should clean up our APIs now that we are on Java 8 and probably >>> 11. For example, delete org.apache.logging.log4j.util.Supplier and use >>> java.util.function.Supplier. Fold all interfaces and classes postfixed >> with >>> "2" into their superclass. All of this will break BC which is what a >> major >>> version change allows us to do. All of this means a new package name and >>> Maven coordinates to avoid jar hell. >>> >>> Gary >>> >>> On Wed, Dec 30, 2020 at 4:01 PM Ralph Goers <ralph.go...@dslextreme.com> >>> wrote: >>> >>>> We would only need to do that if the versions are incompatible. Maven >>>> won’t let you have two versions of log4j-api or log4j-core. >>>> >>>> Ralph >>>> >>>>> On Dec 30, 2020, at 1:02 PM, Gary Gregory <garydgreg...@gmail.com> >>>> wrote: >>>>> >>>>> Another thing for 3.0 is when to change the package name so you can >> have >>>>> 2.x and 3.x in the same class loader without things blowing left and >>>> right. >>>>> Just like you can have 1.x and 2.x at the same time. >>>>> >>>>> Gary >>>>> >>>>> On Wed, Dec 30, 2020, 14:47 Ralph Goers <ralph.go...@dslextreme.com> >>>> wrote: >>>>> >>>>>> If we are going to deprecate them we need to announce that in the next >>>>>> release. I know JSONLayout is being used because we have people >>>> complain >>>>>> about it. If we do that we should have at least 6 months before 3.0 is >>>>>> released and 2.x and 3.0 are going to both be active for a while. >>>>>> >>>>>> >>>>>> Ralph >>>>>> >>>>>>> On Dec 30, 2020, at 12:30 PM, Volkan Yazıcı <volkan.yaz...@gmail.com >>> >>>>>> wrote: >>>>>>> >>>>>>> My motivation for dropping these modules are not merely due to the >> new >>>>>>> JsonTemplateLayout, though rather reducing the maintenance burden. I >>>>>>> "hypothesise" they are not used. For one, I cannot imagine a single >> use >>>>>>> case for YAML layout. Second, AbstractJacksonLayout renders stack >>>> traces >>>>>> in >>>>>>> a nested fashion — i.e., nested objects for JsonLayout, nested XML >>>>>> elements >>>>>>> for XmlLayout. Such arbitrarily nested structures are difficult to >>>>>> interact >>>>>>> with and no storage engine that I know of is able to index them >>>>>>> sufficiently. Hence, given the way stack traces are rendered, I am >>>> pretty >>>>>>> confident that nobody is looking at them. >>>>>>> >>>>>>> If there is anybody out there using JsonLayout, I presume they can >>>> easily >>>>>>> migrate to JsonTemplateLayout without breaking a sweat. If we receive >>>>>>> complaints regarding XML and YAML layouts, we can re-introduce them >>>>>> easily. >>>>>>> 3.0.0 release is a good opportunity to deprecate these modules. >>>> Otherwise >>>>>>> we will need to maintain them for another ~5 years. >>>>>>> >>>>>>> @Gary, is it possible for you to figure out who was using XmlLayout? >>>>>>> >>>>>>> On Wed, Dec 30, 2020 at 4:38 AM Ralph Goers < >>>> ralph.go...@dslextreme.com> >>>>>>> wrote: >>>>>>> >>>>>>>> Volkan, I am fine with deleting those modules however that would >>>> require >>>>>>>> that you make sure that you replace the existing Layouts with ones >>>> that >>>>>> use >>>>>>>> JsonTemplateLayout templates, take the same configuration parameters >>>> and >>>>>>>> produce the same results. >>>>>>>> >>>>>>>> In other words, when people move from 2.x to 3.x we want to minimize >>>> the >>>>>>>> changes they have to make to their applications. All existing >>>>>>>> configurations should continue to work. Custom Plugins should >> require >>>>>>>> recompilation but nothing more. Hopefully that would cover 95% of >> our >>>>>> users. >>>>>>>> >>>>>>>> Ralph >>>>>>>> >>>>>>>>> On Dec 29, 2020, at 2:52 PM, Volkan Yazıcı < >> volkan.yaz...@gmail.com> >>>>>>>> wrote: >>>>>>>>> >>>>>>>>> Hello, >>>>>>>>> >>>>>>>>> I propose deleting all the following 4 modules from master: >>>>>>>>> >>>>>>>>> log4j-layout-jackson >>>>>>>>> log4j-layout-jackson-json >>>>>>>>> log4j-layout-jackson-xml >>>>>>>>> log4j-layout-jackson-yaml >>>>>>>>> >>>>>>>>> The most (only?) used one, JsonLayout, is, IMHO, superseded by >>>>>>>>> JsonTemplateLayout. The rest, I believe, is not even used. If we >>>> happen >>>>>>>> to >>>>>>>>> receive requests, we can consider adding them again. Thoughts? >>>>>>>>> >>>>>>>>> Kind regards. >>>>>>>>> >>>>>>>>> *P.S.* No, I did not forget about the report on Online Drinks #1. I >>>>>> will >>>>>>>> do >>>>>>>>> that sometime this week. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>> >>>>>> >>>>>> >>>> >>>> >>>> >> >>