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 2021/04/06 13:23:14 UTC

Switching Spring Boot from Logback to Log4j

For those who don't know yet, Spring Boot considers switching from Logback
to Log4j <https://github.com/spring-projects/spring-boot/issues/22149>.
Ralph is performing a great lobbying example there. Recently the ticket has
been updated with the following feature checks I have attached below.
Spring Boot will make a great customer for many perspectives of the Log4j
project; visibility, improvements, stability, etc. I am personally really
excited about this development and watching it closely. I wanted to share
these news with the rest of you.

---------- Forwarded message ---------
From: Andy Wilkinson <no...@github.com>
Date: Tue, Apr 6, 2021 at 10:42 AM
Subject: Re: [spring-projects/spring-boot] Investigate impact of switching
default logging system to log4j2 (#22149)
To: spring-projects/spring-boot <sp...@noreply.github.com>
Cc: Volkan Yazıcı <vo...@gmail.com>, Manual <
manual@noreply.github.com>


@rgoers <https://github.com/rgoers> Thank you.

One area that's just come up is providing log4j2-based support for the
<springProfile>
<https://docs.spring.io/spring-boot/docs/2.4.4/reference/htmlsingle/#profile-specific-configuration>
and the <springProperty>
<https://docs.spring.io/spring-boot/docs/2.4.4/reference/htmlsingle/#environment-properties>
elements that we currently support with Logback.

<springProperty> is rather like a lookup and is quite similar to the
existing Spring Boot lookup. <springProperty> doesn't have a dependency on
Spring Cloud whereas it appears the Log4j2's Spring Boot lookup does?

<springProfile> provides some basic conditional configuration support,
allowing configuration to be applied based on the Spring profiles that are
active. From what I've seen, there isn't something similar in Log4j2 at the
moment.

Spring Boot 3 is by no means imminent (it won't be in 2021) so there's no
urgency here at the moment, but it would be interesting to explore what
plugging <springProperty> and <springProfile> support into Log4j2 might
look like.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/spring-projects/spring-boot/issues/22149#issuecomment-813943707>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAARTSKU7QPMXFDIVLYOSTTTHLCN3ANCNFSM4OLK5F3A>
.

Re: Switching Spring Boot from Logback to Log4j

Posted by Volkan Yazıcı <vo...@gmail.com>.
Likewise, Spring is our bread and butter at bol.com. We also happen to
contribute to it on an occasional basis. If there is anything that needs to
be done at the Log4j side, I can easily buy some company time for that.

On Tue, Apr 6, 2021 at 3:50 PM Apache <ra...@dslextreme.com> wrote:

> Yes, I saw the update when I woke up in the middle of the night. We use
> Spring a lot at Nextiva so making the two interoperate nicely is important
> to me.
>
> Ralph
>
> > On Apr 6, 2021, at 6:23 AM, Volkan Yazıcı <vo...@gmail.com>
> wrote:
> >
> > For those who don't know yet, Spring Boot considers switching from
> Logback
> > to Log4j <https://github.com/spring-projects/spring-boot/issues/22149>.
> > Ralph is performing a great lobbying example there. Recently the ticket
> has
> > been updated with the following feature checks I have attached below.
> > Spring Boot will make a great customer for many perspectives of the Log4j
> > project; visibility, improvements, stability, etc. I am personally really
> > excited about this development and watching it closely. I wanted to share
> > these news with the rest of you.
> >
> > ---------- Forwarded message ---------
> > From: Andy Wilkinson <no...@github.com>
> > Date: Tue, Apr 6, 2021 at 10:42 AM
> > Subject: Re: [spring-projects/spring-boot] Investigate impact of
> switching
> > default logging system to log4j2 (#22149)
> > To: spring-projects/spring-boot <sp...@noreply.github.com>
> > Cc: Volkan Yazıcı <vo...@gmail.com>, Manual <
> > manual@noreply.github.com>
> >
> >
> > @rgoers <https://github.com/rgoers> Thank you.
> >
> > One area that's just come up is providing log4j2-based support for the
> > <springProfile>
> > <
> https://docs.spring.io/spring-boot/docs/2.4.4/reference/htmlsingle/#profile-specific-configuration
> >
> > and the <springProperty>
> > <
> https://docs.spring.io/spring-boot/docs/2.4.4/reference/htmlsingle/#environment-properties
> >
> > elements that we currently support with Logback.
> >
> > <springProperty> is rather like a lookup and is quite similar to the
> > existing Spring Boot lookup. <springProperty> doesn't have a dependency
> on
> > Spring Cloud whereas it appears the Log4j2's Spring Boot lookup does?
> >
> > <springProfile> provides some basic conditional configuration support,
> > allowing configuration to be applied based on the Spring profiles that
> are
> > active. From what I've seen, there isn't something similar in Log4j2 at
> the
> > moment.
> >
> > Spring Boot 3 is by no means imminent (it won't be in 2021) so there's no
> > urgency here at the moment, but it would be interesting to explore what
> > plugging <springProperty> and <springProfile> support into Log4j2 might
> > look like.
> >
> > —
> > You are receiving this because you are subscribed to this thread.
> > Reply to this email directly, view it on GitHub
> > <
> https://github.com/spring-projects/spring-boot/issues/22149#issuecomment-813943707
> >,
> > or unsubscribe
> > <
> https://github.com/notifications/unsubscribe-auth/AAARTSKU7QPMXFDIVLYOSTTTHLCN3ANCNFSM4OLK5F3A
> >
> > .
>
>
>

Re: Switching Spring Boot from Logback to Log4j

Posted by Apache <ra...@dslextreme.com>.
Yes, I saw the update when I woke up in the middle of the night. We use Spring a lot at Nextiva so making the two interoperate nicely is important to me.

Ralph

> On Apr 6, 2021, at 6:23 AM, Volkan Yazıcı <vo...@gmail.com> wrote:
> 
> For those who don't know yet, Spring Boot considers switching from Logback
> to Log4j <https://github.com/spring-projects/spring-boot/issues/22149>.
> Ralph is performing a great lobbying example there. Recently the ticket has
> been updated with the following feature checks I have attached below.
> Spring Boot will make a great customer for many perspectives of the Log4j
> project; visibility, improvements, stability, etc. I am personally really
> excited about this development and watching it closely. I wanted to share
> these news with the rest of you.
> 
> ---------- Forwarded message ---------
> From: Andy Wilkinson <no...@github.com>
> Date: Tue, Apr 6, 2021 at 10:42 AM
> Subject: Re: [spring-projects/spring-boot] Investigate impact of switching
> default logging system to log4j2 (#22149)
> To: spring-projects/spring-boot <sp...@noreply.github.com>
> Cc: Volkan Yazıcı <vo...@gmail.com>, Manual <
> manual@noreply.github.com>
> 
> 
> @rgoers <https://github.com/rgoers> Thank you.
> 
> One area that's just come up is providing log4j2-based support for the
> <springProfile>
> <https://docs.spring.io/spring-boot/docs/2.4.4/reference/htmlsingle/#profile-specific-configuration>
> and the <springProperty>
> <https://docs.spring.io/spring-boot/docs/2.4.4/reference/htmlsingle/#environment-properties>
> elements that we currently support with Logback.
> 
> <springProperty> is rather like a lookup and is quite similar to the
> existing Spring Boot lookup. <springProperty> doesn't have a dependency on
> Spring Cloud whereas it appears the Log4j2's Spring Boot lookup does?
> 
> <springProfile> provides some basic conditional configuration support,
> allowing configuration to be applied based on the Spring profiles that are
> active. From what I've seen, there isn't something similar in Log4j2 at the
> moment.
> 
> Spring Boot 3 is by no means imminent (it won't be in 2021) so there's no
> urgency here at the moment, but it would be interesting to explore what
> plugging <springProperty> and <springProfile> support into Log4j2 might
> look like.
> 
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/spring-projects/spring-boot/issues/22149#issuecomment-813943707>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAARTSKU7QPMXFDIVLYOSTTTHLCN3ANCNFSM4OLK5F3A>
> .