question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Description

Equivalent to https://github.com/quarkiverse/quarkus-logging-logback for Log4J 2.

Allow me to use Log4J 2 to configure Quarkus logging via log4j2.yml et al as per https://logging.apache.org/log4j/2.x/manual/configuration.html#AutomaticConfiguration

Motivation There’s nothing to be gained by using <insert-your-favorite-mainstream-Java-logging-framework-here> over <some-other-mainstream-Java-logging-framework>. In this day and age they all more than fulfill the requirements most of us have.

However, there’s a lot to loose if you can’t use <insert-your-favorite-mainstream-Java-logging-framework-here> on a particular Java tech stack.

It’s not about the features or the technology but about the TCO. As an organization you’ll likely want to use the same logging configuration across systems for a number reasons - particularly if you run microservices(-like) environments. We have come to appreciate that modern applications use a logging facade in the code that allows to plug in different logging backends. This ensures that regardless of technology stack in can use the same logging configuration. Customers do not want to configure Logback for applications A-C, Log4j for D-G and some other config for the rest.

I am all for opinionated stacks like Quarkus as long as I can have my own opinion where I disagree 😄

Configuration suggestion

No response

Additional context

This started at https://stackoverflow.com/q/68539676/131929 and continued at https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/Logging.20frustration/near/247367612 - thanks @gastaldi and @Ladicek for your input so far.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

2reactions
MarcusBielcommented, Jul 30, 2021

Yes, this is also something we would need 😃

0reactions
quarkus-bot[bot]commented, Nov 4, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Apache Log4j 2
Like Logback, Log4j 2 supports filtering based on context data, markers, regular expressions, and other components in the Log event. Filtering ...
Read more >
Apache Log4j 2 Tutorials - Mkyong.com
Appenders> · Console ; PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/> · Console ; Appenders> · Loggers ; Logger name=" ...
Read more >
Log4j2 Example Tutorial - Configuration, Levels, Appenders
Using Logging API in application isn't a luxury, it's a must have. Log4j is an open source library that's published and licensed under...
Read more >
apache/logging-log4j2 - GitHub
Apache Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements ......
Read more >
Log4j 2 Tutorial: Configuration Example for Logging in Java
logging we don't have to do any setup. By default, Log4j 2 will use the ConsoleAppender to write the log message to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found