Skip to content

Switch default logger from logback to log4j2 #16864

@djkeh

Description

@djkeh

Hi,

This debate has already been done in #10072, but I'd like to raise this issue once again because:

  1. Use log4j2 as the default logging instead of logback #10072 is the latest issue dealing with this, as far as I know.
  2. If 1. is correct, the issue is closed about 2 years ago.
  3. There are reasonable advantages to use log4j2 as default logger.

Thus, I think it's about right time to talk about this again, and if I may, I'd like to ask you to reconsider log4j2 as default logger in Spring Boot project, as it seems log4j2 has pretty decent reasons to replace logback like:

  • log4j2 is officially better version of logback.
  • log4j2 performances are better in many aspects compared to logback, especially in multi-threaded environment.
  • Log4j 2.11.2 is production-ready.
  • log4j2 virtually has every feature that logback provides.
  • log4j2 provides easy and almost same experience to slf4j and logback api.
  • log4j2 has backward compatibility for log4j and slf4j.
  • Many other reports and instructions recommend to use log4j2 instead of logback if possible.

It may not be so critical and urgent, however, I believe I'm not the only one to see this "upgrade" in close future.
I'd like to ask for your opinion.

Thanks.

Reference

Apache Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available in Logback while fixing some inherent problems in Logback’s architecture.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions