Skip to content

Conversation

@ppkarwasz
Copy link
Contributor

Adds an API to perform automatic conversions between different logging configuration file formats and a basic implementation. The implementation supports the following configuration file formats:

  • Log4j Core 2 XML,
  • Log4j Core 2 JSON,
  • Log4j Core 2 YAML,
  • Log4j Core 2 Properties (read-only),
  • Log4j Core 3 Properties.

The API is extensible through ServiceLoader and allows integrators to provide support for additional configuration file formats.

Read-only support for the Log4j 1 Properties and Log4j 1 XML configuration formats will be provided in a separate PR.

Note: Currently the API is only accessible from Java code. Its main purpose is to provide a "Migrate Log4j 1.x to Log4j Core 2.x", a "Migrate Logback to Log4j Core 2.x" and a "Migrate JUL to Log4j Core 2.x" OpenRewrite recipe. A picocli-based log4j-transform-cli tool to access all the goodies in this repository, will be provided later.

Closes apache/logging-log4j2#2080

Adds an API to perform automatic conversions between different logging configuration file formats and a basic implementation.
The implementation supports the following configuration file formats:

- Log4j Core 2 XML,
- Log4j Core 2 JSON,
- Log4j Core 2 YAML,
- Log4j Core 2 Properties (read-only),
- Log4j Core 3 Properties.

The API is extensible through `ServiceLoader` and allows integrators to provide support for additional configuration file formats.

Read-only support for the Log4j 1 Properties and Log4j 1 XML configuration formats will be provided in a separate PR.

**Note**: Currently the API is only accessible from Java code.
Its main purpose is to provide a "Migrate Log4j 1.x to Log4j Core 2.x", a "Migrate Logback to Log4j Core 2.x" and a "Migrate JUL to Log4j Core 2.x" [OpenRewrite recipe](https://docs.openrewrite.org/recipes/java/logging/log4j).
A `picocli`-based `log4j-transform-cli` tool to access all the goodies in this repository, will be provided later.

Closes apache/logging-log4j2#2080
@ppkarwasz ppkarwasz merged commit f4392b1 into main Nov 27, 2024
9 checks passed
@ppkarwasz ppkarwasz deleted the feature/new-config-converter branch November 27, 2024 13:57
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.

[MS28] Automatic migration tools

1 participant