Skip to content

Add general ConfigurationExtension mechanism #2230

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

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

ppkarwasz
Copy link
Contributor

This PR is based on #2228.

We introduce a general ConfigurationExtension mechanism that would allow external Log4j plugins to add additional elements as children of the <Configuration> element.

This mechanism is used to remove all direct references to async components in AbstractConfiguration.

The <AsyncWaitStrategyFactory> configuration element is renamed to <Disruptor>, while maintaining backward compatibility.

@ppkarwasz ppkarwasz force-pushed the split-async2 branch 2 times, most recently from c878ff2 to e7b386a Compare January 23, 2024 15:02
@ppkarwasz ppkarwasz self-assigned this Jan 23, 2024
Copy link
Member

@vy vy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really liked the idea Piotr! 🤩 I left some remarks. But the direction LGTM! 💯

ppkarwasz added a commit to ppkarwasz/logging-log4j2 that referenced this pull request Jan 24, 2024
ppkarwasz added a commit to ppkarwasz/logging-log4j2 that referenced this pull request Jan 24, 2024
We introduce a general `ConfigurationExtension` mechanism that would
allow external Log4j plugins to add additional elements as children of
the `<Configuration>` element.

This mechanism is used to remove all direct references to async
components in `AbstractConfiguration`.

The `<AsyncWaitStrategyFactory>` configuration element is renamed to
`<Disruptor>`, while maintaining backward compatibility.
@ppkarwasz ppkarwasz merged commit 709c593 into apache:main Jan 24, 2024
@ppkarwasz ppkarwasz deleted the split-async2 branch January 24, 2024 19:58
@ppkarwasz
Copy link
Contributor Author

Part of #2163

@ppkarwasz
Copy link
Contributor Author

@garydgregory,

Do you have some suggestions on the naming of the new Configuration#addExtensionIfAbsent and Configuration#getExtension methods? I was thinking about renaming the first registerExtension, while the second seems to be similar to OSGi's Bundle#adapt method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants