Revamp the Extending, Plugins, Architecture, and Programmatic configuration pages#2716
Revamp the Extending, Plugins, Architecture, and Programmatic configuration pages#2716
Extending, Plugins, Architecture, and Programmatic configuration pages#2716Conversation
ppkarwasz
left a comment
There was a problem hiding this comment.
Sorry, I approved the wrong PR. 😉
I'll add a review later.
jvz
left a comment
There was a problem hiding this comment.
Looks good so far! Now I'll look through your TODO list.
|
|
||
| Configuration --> Filter | ||
|
|
||
| Configuration --> "0..*" Appender |
There was a problem hiding this comment.
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 |
|
|
||
| * 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.
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.adocfor Log4j 3@Namespace,@Category,@PluginOrder,@Ordered, etc.@Orderplugins.adocanddependencyinjection.adocdependencyinjection.adocplugins.adoccan be improvedplugin-preliminaries.adoccategory, etc.) ofappenders.adocconfiguration.adocextending.adocfilters.adoclayouts.adoclookups.adocpattern-layout.adocOnce #2696 is ported, #2692 and #2715 needs to be ported (in given order) too.