Skip to content

Order LoggingSystemFactory implementations more robustly #44689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wilkinsona opened this issue Mar 12, 2025 · 0 comments
Closed

Order LoggingSystemFactory implementations more robustly #44689

wilkinsona opened this issue Mar 12, 2025 · 0 comments
Assignees
Labels
type: task A general task
Milestone

Comments

@wilkinsona
Copy link
Member

wilkinsona commented Mar 12, 2025

The LoggingSystemFactory implementations are loaded using SpringFactoriesLoader. It orders them using AnnotationAwareOrderComparator but each LoggingSystemFactory implementation has the same order (Ordered.LOWEST_PRECEDENCE) which means the ordering is undefined. I think we're currently relying on SpringFactoriesLoader preserving the order of the comma-separated list in META-INF/spring.factories when parsing the file and then the sorting process leaving this order unchanged once the factories have been instantiated and their orders compared. To make things more robust, we should declare our LoggingSystemFactory implementations with orders that reflect our logging system preferences:

  1. Logback
  2. Log4j2
  3. JUL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

1 participant