Skip to content

Sync 'dev' branch#11

Merged
mercyblitz merged 10 commits intodev-1.xfrom
dev
Mar 17, 2026
Merged

Sync 'dev' branch#11
mercyblitz merged 10 commits intodev-1.xfrom
dev

Conversation

@mercyblitz
Copy link
Contributor

This pull request simplifies the logging dependencies in the microsphere-logging-parent project by removing outdated and redundant logging libraries from the Maven configuration. The focus is now on using more modern logging frameworks.

Dependency cleanup:

  • Removed the Apache Commons Logging dependency and its version property from the pom.xml, reducing unnecessary transitive dependencies. [1] [2]
  • Removed the Log4j 1.x dependency and its version property, ensuring only the newer Log4j2 is included for logging support. [1] [2]

Delete Apache Commons Logging config from microsphere-logging-parent/pom.xml: the <apache-commons-logging.version> property and the commons-logging dependency were removed. Logging dependencies remain managed via the existing SLF4J/Log4J entries in the parent POM.
Remove the legacy Log4j 1.x property and dependency from microsphere-logging-parent POM (log4j.version and log4j:log4j 1.2.17). Update comment to reflect Log4j2 usage and keep Log4j2 (log4j-api) dependency. This drops support for the old Log4j 1.x artifact in favor of Log4j2.
@augmentcode
Copy link

augmentcode bot commented Mar 17, 2026

🤖 Augment PR Summary

Summary: Simplifies the microsphere-logging-parent Maven dependency management by dropping legacy Commons Logging and Log4j 1.x version/dependency entries.
Changes: Leaves SLF4J + Logback/Log4j2 as the managed logging stack to reduce redundant/outdated transitive dependencies.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

<version>${apache-commons-logging.version}</version>
</dependency>

<!-- Slf4j -->
Copy link

Choose a reason for hiding this comment

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

After removing commons-logging:commons-logging and log4j:log4j from this parent’s dependencyManagement, modules like microsphere-logging-commons still declare those dependencies without explicit <version>s, which will fail Maven resolution unless the imported microsphere-java-dependencies BOM manages them.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Add a new property <log4j.version>1.2.17</log4j.version> and include the log4j:log4j dependency using that version in microsphere-logging-parent/pom.xml. This ensures legacy Log4j 1.2.17 is available for modules that require compatibility with older logging integrations.
Correct the <name> element in microsphere-log4j2/pom.xml from 'Microsphere :: Logging :: Logj4' to 'Microsphere :: Logging :: Log4j2' to fix a typo and align the module name with the project. No functional changes.
Update .github/workflows/maven-build.yml: remove 'main' from pull_request branches (PRs now trigger only for dev and release) and expand the Java test matrix to include Java 8 and 11 alongside 17, 21 and 25 to broaden CI coverage for older JDKs.
Update .github/workflows/maven-publish.yml: change the default revision from '2.0.0-SNAPSHOT' to '1.0.0-SNAPSHOT' and switch the Actions Java runtime from 17 to 11 (temurin). Aligns the workflow with the intended default publish version and Java compatibility.
Normalize log4j section comments in microsphere-logging-commons/pom.xml: change "Log4j 1.x" to "Log4j" and "Log4j 2.x" to "Log4j2". No dependency or functional changes—just comment text for clarity.
Introduce a new microsphere-log4j module providing Log4j support: add implementation classes (Log4j2Logger, Log4jLoggerFactory, Log4jLogging, LoggerUtils), service loader entries, test suite and a test log4j.xml. Integrate the module into the build by updating root pom (add module, adjust revision/java.version), include the module in microsphere-logging-dependencies and examples poms, and add Log4j dependencies to README and examples. Also update microsphere-logging-parent: bump junit-jupiter.version and add Java 8/17+ profiles to manage compatibility.
@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ Complexity Δ
...ava/io/microsphere/logging/log4j/Log4j2Logger.java 100.00% <100.00%> (ø) 17.00 <17.00> (?)
.../microsphere/logging/log4j/Log4jLoggerFactory.java 100.00% <100.00%> (ø) 4.00 <4.00> (?)
...ava/io/microsphere/logging/log4j/Log4jLogging.java 100.00% <100.00%> (ø) 11.00 <11.00> (?)
...io/microsphere/logging/log4j/util/LoggerUtils.java 100.00% <100.00%> (ø) 14.00 <14.00> (?)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mercyblitz mercyblitz merged commit 49e62de into dev-1.x Mar 17, 2026
6 checks passed
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