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

Add a tool to manipulate plugin descriptors #139

Merged
merged 6 commits into from
Nov 7, 2024

Conversation

ppkarwasz
Copy link
Contributor

The tool is based on picocli and supports the following commands:

  • toJson: converts a Log4j2Plugins.dat to a JSON representation.
  • fromJson: converts the JSON representation of a plugin descriptor to its Log4j2Plugins.dat form.
  • filterReflectConfig: filters a GraalVM reflect-config.json file by removing the classes that are not contained in a Log4j2Plugins.json file.

The tool is based on picocli and supports the following commands:

* `toJson`: converts a `Log4j2Plugins.dat` to a JSON representation.
* `fromJson`: converts the JSON representation of a plugin descriptor to its `Log4j2Plugins.dat` form.
* `filterReflectConfig`: filters a GraalVM `reflect-config.json` file by removing the classes that are not contained in a `Log4j2Plugins.json` file.
ppkarwasz added a commit to apache/logging-log4j-samples that referenced this pull request Oct 28, 2024
By using the new `log4j-convert-plugin-descriptor` tool introduced in
apache/logging-log4j-transform#139
this PR:

1. Adds a customized `use-log4j-core-jtl-minimal` GraalVM profile that
   only includes the plugins required by JSON Template Layout.
2. Generates the existent `use-log4j-core-minimal` GraalVM profile using
   a custom `Log4j2Plugins.json` file. The previous profile was edited
   manually.

Closes apache/logging-log4j2#2834.
@ppkarwasz ppkarwasz marked this pull request as ready for review October 28, 2024 11:57
@ppkarwasz ppkarwasz merged commit bf7f0b0 into main Nov 7, 2024
9 checks passed
@ppkarwasz ppkarwasz deleted the feature/converter-plugins-cache branch November 7, 2024 08:03
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.

1 participant