-
Notifications
You must be signed in to change notification settings - Fork 1
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 Log4j API to JUL bridge #3
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git-svn-id: https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk@1241269 13f79535-47bb-0310-9956-ffa450edef68
The original 15 was blindly copied from SLF4JProvider. It's probably better to not have them be the same, and have To-JUL's higher than SLF4j's (which in turn is higher than Core's 10).
These tests provide additional coverage in the event parameters are passed through, demonstrating how JUL formatters are likely to misinterpret such LogRecords.
- Remove invalid <relativePath> values - Disable doap and changes plugins in child modules - Use correct Fragment-Host in bundles implementing log4j-core plugins - Add OSGi service loader metadata for more bundles
Switches `log4j-to-slf4j` and `log4j-to-jul` from using the Service Loader Mediator to registering their provider themselves. This way they can be used in minimal OSGI systems. Newer tests in `log4j-osgi` are written using PAX Exam in order to provide a larger OSGI environment.
`LogManager.getGlobal().getLevel()` is not a good fallback for the case when all JUL logger levels are null, since its level is usually null.
This replaces independent JUnit5 dependency versioning with a single `junit-bom` dependency.
This removes the scope of the dependencies from <dependencyManagement> and adds it to the children POMs. The reason behind this is that we don't want to force the scope of transitive dependencies: e.g. `log4j-api` has a `javax.inject` transitive test dependency. If we set the scope to `provided` in the parent POM, the test dependency becomes a provided dependency.
Improves the `src/tools/sort-pom.xslt` stylesheet to sort dependencies in the POM files according to the scope, artifact id (with a priority for Logj2 artifacts) and group id. It uses this script to automatically sort all POM files.
This PR removes all explicitly versioned plugins that are also defined in the Apache ASF parent POM (`org.apache:apache`). This has the following effect on plugin versions: * `maven-assembly-plugin` bumped to 3.4.1 * `maven-jar-plugin` bumped to 3.2.2 * `maven-javadoc-plugin` bumped to 3.4.0 * `maven-project-info-reports-plugin` bumped to 3.3.0 * `maven-release-plugin` bumped to 3.0.0-M6 * `maven-scm-plugin` bumped to 1.13.0 * `maven-site-plugin` bumped to 3.12.0
The versions of all used plugins are specified in the `log4j` parent POM or other parent POMs (`log4j-bom`, `log4j-samples`, `log4j-spring-cloud-config` or `log4j-spring-cloud-config-samples`). The script `src/tools/explicit-version.xslt` can be used to check for explicitly provided version.
The 'default' maven-remote-resources-plugin execution is a no-op, because the ASF parent uses a different id.
- Removed `maven-jxr-plugin` - Generating no Javadoc JARs (this was already the case) - Removed Javadoc JARs from the assembly in `log4j-distribution` - Generating Javadoc HTML only for `log4j-core` and `log4j-api` - Copying generated Javadoc HTML to `target/site/javadoc/<artifactId>`
This also runs `spotless:apply` on the modified files.
- `/pom.xml` is moved to `/log4j-parent/pom.xml` - `/log4j-bom/pom.xml` is moved to `/pom.xml` - Implements the BOM organization described by Maven[1]. That is, `parent` inherits from `bom`. - Takes advantage of `flatten-bom` provided by `logging-parent` - Identical scheme to the one found in `-tools` and `-transformation` [1] https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms
There are many modules that do not depend on `log4j-core` and they can be easily built without it on the processor path.
Since the split between modules that have Log4j Core plugins and those that don't is about 50/50, it is more proper to add `log4j-core` to some modules instead of removing it from others (and copy/paste all other options).
In order to prevent API breaking changes, this: * adds [`bnd-baseline-maven-plugin`](https://github.com/bndtools/bnd/tree/master/maven-plugins/bnd-baseline-maven-plugin), * fix the API changes that would require a major version bump, * set the OSGi version of each packages to `2.20.1` or `2.21.0`, depending on the kind of changes the package underwent since the `2.20.0` release.
Signed-off-by: Matt Sicker <mattsicker@apache.org>
By removing the reflective instantiation of `LoggerContextFactory` and `ThreadContextMap`, we make `log4j-to-jul` and `log4j-to-slf4j` more GraalVM-friendly.
- Make `StringArray` the default thread context map - Remove `CopyOnWriteSortedArrayThreadContextMap` - Move `GarbageFreeSortedArrayThreadContextMap` to `log4j-core`
This adds a Groovy script that fails the build if any optional JPMS module has the `transitive` qualifier. We remove the `transitive` modifier from all optional dependencies. Closes #2929. Co-authored-by: Volkan Yazıcı <volkan@yazi.ci>
Co-authored-by: Piotr P. Karwasz <piotr.github@karwasz.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This add a new
log4j-api-to-jul
bridge based onlog4j-to-jul
from the2.x
branch of Log4j.