This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch 2.x-docgen in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 55659648e587466b6bab62336b32f2dd3314d292 Author: Volkan Yazıcı <[email protected]> AuthorDate: Thu Mar 14 11:24:36 2024 +0100 Improve plugin reference pages --- pom.xml | 2 +- src/asciidoc/templates/document.html.erb | 3 +- src/docgen-templates/index.adoc.ftl | 32 +++++++++++++++++++--- .../{license.adoc.ftl => license.adoc} | 0 src/docgen-templates/type.adoc.ftl | 11 +++++++- 5 files changed, 41 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 82ec7b15ed..49e8528346 100644 --- a/pom.xml +++ b/pom.xml @@ -803,7 +803,7 @@ <templateDirectory>${project.basedir}/src/docgen-templates</templateDirectory> <indexTemplate> <source>index.adoc.ftl</source> - <target>${project.build.directory}/generated-sources/site/asciidoc/plugin-reference.adoc</target> + <target>${project.build.directory}/generated-sources/site/asciidoc/plugin-reference/index.adoc</target> </indexTemplate> <typeTemplate> <source>type.adoc.ftl</source> diff --git a/src/asciidoc/templates/document.html.erb b/src/asciidoc/templates/document.html.erb index bd752114f4..b9b24caaad 100644 --- a/src/asciidoc/templates/document.html.erb +++ b/src/asciidoc/templates/document.html.erb @@ -65,7 +65,8 @@ <li> <a href="#">Learn <i class="fa fa-chevron-circle-down" aria-hidden="true"></i></a> <ul class="menu-drop-down"> - <li><a href="/docs.html">Documentation</a></li> + <li><a href="/docs.html">Manual</a></li> + <li><a href="/plugin-reference/index.html">Plugin reference</a></li> <li><a href="https://cwiki.apache.org/confluence/display/LOGGING/Log4j">Wiki</a></li> <li><a href="/articles.html">Articles</a></li> <li><a href="/faq.html">FAQ</a></li> diff --git a/src/docgen-templates/index.adoc.ftl b/src/docgen-templates/index.adoc.ftl index 496ac6ce68..b914712e74 100644 --- a/src/docgen-templates/index.adoc.ftl +++ b/src/docgen-templates/index.adoc.ftl @@ -16,9 +16,33 @@ See the License for the specific language governing permissions and limitations under the License. --> <#-- @ftlvariable name="lookup" type="org.apache.logging.log4j.docgen.generator.TypeLookup" --> -<#include "license.adoc.ftl"> +<#include "license.adoc"> + += Plugin reference + +This page is a Javadoc-on-steroids specialized for Log4j plugins. +This reference manual is derived from the source code of all Log4j plugins and types associated with them. +You can use this reference manual to precisely customize your `log4j2.xml`. + +[INFO] +==== +Every running Log4j system is a constellation of xref:manual/plugins.adoc[plugins], which is analogous to beans in Java EE and Spring. +This not only allows Log4j itself to be developed in individual components, but also enables extensibility users can leverage. +==== + +[#shortcuts] +== Shortcuts + +* xref:org.apache.logging.log4j/log4j-core/org.apache.logging.log4j.core.config.Configuration.adoc[The `<Configuration>` element assembly in a `log4j2.xml`] +* xref:org.apache.logging.log4j/log4j-core/org.apache.logging.log4j.core.Appender.adoc[The type hierarchy of *appenders*] +* xref:org.apache.logging.log4j/log4j-core/org.apache.logging.log4j.core.Layout.adoc[The type hierarchy of *layouts*] +* xref:org.apache.logging.log4j/log4j-core/org.apache.logging.log4j.core.Filter.adoc[The type hierarchy of *filters*] + [#index] -= Index +== Index + +Below is a list of all types reachable by plugins grouped by the Maven coordinate of the artifact bundling them. + <#assign sourcedTypes = lookup?values/> <#-- @ftlvariable name="sourcedTypes" type="org.apache.logging.log4j.docgen.generator.ArtifactSourcedType[]" --> <#assign lastGroupId = ''/> @@ -29,8 +53,8 @@ limitations under the License. <#assign lastArtifactId = sourcedType.artifactId/> [#${sourcedType.groupId?replace('.', '_')}-${sourcedType.artifactId?replace('.', '_')}] -== `${sourcedType.groupId}:${sourcedType.artifactId}` +=== `${sourcedType.groupId}:${sourcedType.artifactId}` </#if> -* xref:plugin-reference/${sourcedType.groupId}/${sourcedType.artifactId}/${sourcedType.type.className}.adoc[`${sourcedType.type.className}`] +* xref:${sourcedType.groupId}/${sourcedType.artifactId}/${sourcedType.type.className}.adoc[`${sourcedType.type.className}`] </#list> diff --git a/src/docgen-templates/license.adoc.ftl b/src/docgen-templates/license.adoc similarity index 100% rename from src/docgen-templates/license.adoc.ftl rename to src/docgen-templates/license.adoc diff --git a/src/docgen-templates/type.adoc.ftl b/src/docgen-templates/type.adoc.ftl index 49f96edf17..3c087e7a96 100644 --- a/src/docgen-templates/type.adoc.ftl +++ b/src/docgen-templates/type.adoc.ftl @@ -19,7 +19,7 @@ <#assign type = sourcedType.type/> <#-- @ftlvariable name="type" type="org.apache.logging.log4j.docgen.Type" --> <#-- @ftlvariable name="lookup" type="org.apache.logging.log4j.docgen.generator.TypeLookup" --> -<#include "license.adoc.ftl"> +<#include "license.adoc"> [#${type.className?replace('.', '_')}] = ${type.name!('`' + type.className + '`')} @@ -135,3 +135,12 @@ a|${descriptionCell} * xref:../../${implSourcedType.groupId}/${implSourcedType.artifactId}/${impl}.adoc[${impl?contains('.')?then(impl?keep_after_last('.'), impl)}] </#list> </#if> + +[#shortcuts] +== Shortcuts + +* xref:../../index.adoc[The plugin reference] +* xref:../../org.apache.logging.log4j/log4j-core/org.apache.logging.log4j.core.config.Configuration.adoc[The `<Configuration>` element assembly in a `log4j2.xml`] +* xref:../../org.apache.logging.log4j/log4j-core/org.apache.logging.log4j.core.Appender.adoc[The type hierarchy of *appenders*] +* xref:../../org.apache.logging.log4j/log4j-core/org.apache.logging.log4j.core.Layout.adoc[The type hierarchy of *layouts*] +* xref:../../org.apache.logging.log4j/log4j-core/org.apache.logging.log4j.core.Filter.adoc[The type hierarchy of *filters*]
