You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Volkan Yazıcı <vo...@gmail.com> on 2020/06/03 09:59:37 UTC

Re: [log4j] Drop org.apache.logging.log4j.util.Supplier from master for 3.x

Can we also replace core.time.Instant with java.time.Instant?

On Sun, May 24, 2020 at 11:57 PM Volkan Yazıcı <vo...@gmail.com> wrote:
>
> May I second that with {Bi,Tri}Consumer classes as well?
>
> On Sun, May 24, 2020 at 11:21 PM Gary Gregory <ga...@gmail.com> wrote:
> >
> > Hi All,
> >
> > Can we drop org.apache.logging.log4j.util.Supplier from master for 3.x and
> > replace its usage with java.util.function.Supplier?
> >
> > Gary

Re: [log4j] Drop org.apache.logging.log4j.util.Supplier from master for 3.x

Posted by Remko Popma <re...@gmail.com>.
The intention of the core.time.Instant class is to provide a mutable equivalent of java.time.Instant (which is immutable).
 This allows for us to create high precision (sub-millisecond) timestamps while reusing some objects and remaining garbage free. 

So in short, no, our implementation provides functionality that the JDK class doesn’t have so we cannot replace it (at least not without loss of functionality).

> On Jun 3, 2020, at 18:59, Volkan Yazıcı <vo...@gmail.com> wrote:
> 
> Can we also replace core.time.Instant with java.time.Instant?
> 
>> On Sun, May 24, 2020 at 11:57 PM Volkan Yazıcı <vo...@gmail.com> wrote:
>> 
>> May I second that with {Bi,Tri}Consumer classes as well?
>> 
>>> On Sun, May 24, 2020 at 11:21 PM Gary Gregory <ga...@gmail.com> wrote:
>>> 
>>> Hi All,
>>> 
>>> Can we drop org.apache.logging.log4j.util.Supplier from master for 3.x and
>>> replace its usage with java.util.function.Supplier?
>>> 
>>> Gary

Re: [log4j] Drop org.apache.logging.log4j.util.Supplier from master for 3.x

Posted by Matt Sicker <bo...@gmail.com>.
We looked at that before. It seems to introduce garbage, though I haven’t
investigated it in practice (it might optimize away through escape
analysis).

On Wed, Jun 3, 2020 at 07:24 Gary Gregory <ga...@gmail.com> wrote:

> I'm all for cleaning all that up a la Java 8.
>
> Gary
>
> On Wed, Jun 3, 2020, 05:59 Volkan Yazıcı <vo...@gmail.com> wrote:
>
> > Can we also replace core.time.Instant with java.time.Instant?
> >
> > On Sun, May 24, 2020 at 11:57 PM Volkan Yazıcı <vo...@gmail.com>
> > wrote:
> > >
> > > May I second that with {Bi,Tri}Consumer classes as well?
> > >
> > > On Sun, May 24, 2020 at 11:21 PM Gary Gregory <ga...@gmail.com>
> > wrote:
> > > >
> > > > Hi All,
> > > >
> > > > Can we drop org.apache.logging.log4j.util.Supplier from master for
> 3.x
> > and
> > > > replace its usage with java.util.function.Supplier?
> > > >
> > > > Gary
> >
>
-- 
Matt Sicker <bo...@gmail.com>

Re: [log4j] Drop org.apache.logging.log4j.util.Supplier from master for 3.x

Posted by Gary Gregory <ga...@gmail.com>.
I'm all for cleaning all that up a la Java 8.

Gary

On Wed, Jun 3, 2020, 05:59 Volkan Yazıcı <vo...@gmail.com> wrote:

> Can we also replace core.time.Instant with java.time.Instant?
>
> On Sun, May 24, 2020 at 11:57 PM Volkan Yazıcı <vo...@gmail.com>
> wrote:
> >
> > May I second that with {Bi,Tri}Consumer classes as well?
> >
> > On Sun, May 24, 2020 at 11:21 PM Gary Gregory <ga...@gmail.com>
> wrote:
> > >
> > > Hi All,
> > >
> > > Can we drop org.apache.logging.log4j.util.Supplier from master for 3.x
> and
> > > replace its usage with java.util.function.Supplier?
> > >
> > > Gary
>