-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Revamp the Extending
, Plugins
, Architecture
, and Programmatic configuration
pages
#2716
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I approved the wrong PR. 😉
I'll add a review later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far! Now I'll look through your TODO list.
|
||
Configuration --> Filter | ||
|
||
Configuration --> "0..*" Appender |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PlantUML docs have some other relation types you can use here like o--
for aggregation and *--
for composition, though I've used the aggregation relation before to denote when one class has an array or collection of another class. What you've done here, though, is probably easier to understand for people who don't write UML diagrams :)
An overview these major classes can be depicted as follows: | ||
|
||
[#architecture-diagram] | ||
.An overview of major classes and their relation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This UML diagram is pretty awesome!
|
||
* A <<LoggerContext>>, the composition anchor, gets created in combination with a <<Configuration>>. | ||
Both can be created either directly (i.e., programmatically) or indirectly at first interaction with Log4j. | ||
* `LoggerContext` creates <<Logger>>s that users interact with for logging purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be worth mentioning that Logger
and LoggerConfig
work via a bridge pattern where Logger
provides the API and LoggerConfig
provides the implementation. This is one key architectural constraint that allows for reconfiguration without dropping any log events being processed at the time of reconfiguration. It's also one of the reasons why many methods of manual configuration of appenders and such is so hard to do properly and why we offer various utility methods and configuration DSLs to sort of hide away the lifecycle handling, concurrency, etc.
So far, I've mostly updated the plugins page, but I still have some things to add about order annotations, probably some info about conditional annotations, and a link to the DI page. |
Remaining tasks:
|
This incomplete work ports #2696 to
main
.The following tasks still need to be done:
plugins.adoc
for Log4j 3@Namespace
,@Category
,@PluginOrder
,@Ordered
, etc.@Order
plugins.adoc
anddependencyinjection.adoc
dependencyinjection.adoc
plugins.adoc
can be improvedplugin-preliminaries.adoc
category
, etc.) ofappenders.adoc
configuration.adoc
extending.adoc
filters.adoc
layouts.adoc
lookups.adoc
pattern-layout.adoc
Once #2696 is ported, #2692 and #2715 needs to be ported (in given order) too.