Skip to content
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

Note using Log4j2PluginsCacheFileTransformer in doc #1178

Merged
merged 4 commits into from
Jan 23, 2025

Conversation

Goooler
Copy link
Member

@Goooler Goooler commented Jan 23, 2025

@Goooler Goooler requested a review from Copilot January 23, 2025 10:32
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

src/docs/configuration/merging/README.md Outdated Show resolved Hide resolved
Goooler and others added 2 commits January 23, 2025 18:33
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Goooler Goooler changed the title Note using Log4j2PluginsCacheFileTransformer in doc Note using Log4j2PluginsCacheFileTransformer in doc Jan 23, 2025
Copy link
Contributor

@ppkarwasz ppkarwasz left a comment

Choose a reason for hiding this comment

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

LGTM,

I added/corrected some links below:

@@ -176,6 +176,18 @@ tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.Shadow
}
```

## Merging Log4j2 Plugin Cache Files (`Log4j2Plugins.dat`)

`Log4j2PluginsCacheFileTransformer` is a `Transformer` that merges `META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat` plugin caches from all the jars
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`Log4j2PluginsCacheFileTransformer` is a `Transformer` that merges `META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat` plugin caches from all the jars
`Log4j2PluginsCacheFileTransformer` is a `Transformer` that merges [`Log4j2Plugins.dat` plugin descriptors](https://logging.apache.org/log4j/2.x/manual/plugins.html#plugin-registry) from all the jars

Nit: personally I prefer to call the "descriptors" instead of "caches", although "cache" was the original term used.

Copy link
Member Author

Choose a reason for hiding this comment

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

https://logging.apache.org/log4j/2.x/manual/plugins.html#plugin-registry

This link indicates "Registering plugins" instead of "Log4j2Plugins.dat plugin descriptors" self, I'm worried there might be misleading here?

Copy link
Contributor

Choose a reason for hiding this comment

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

You might be right.
Currently we don't have a better reference for that, just the "registering plugins" section and some answers in the FAQ.

Maybe you could point at the Shading/Shadowing FAQ entry, although that sections almost immediately points back at your documentation. 😉

Copy link
Member Author

Choose a reason for hiding this comment

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

Alright. I'll leave the file path here just for now.

src/docs/configuration/merging/README.md Outdated Show resolved Hide resolved
Co-authored-by: Piotr P. Karwasz <piotr@github.copernik.eu>
@Goooler Goooler enabled auto-merge (squash) January 23, 2025 11:19
@Goooler Goooler merged commit 1f543ed into main Jan 23, 2025
7 checks passed
@Goooler Goooler deleted the g/20250123/note-transformer branch January 23, 2025 11:23
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