Skip to content

Sync 'dev' branch#8

Merged
mercyblitz merged 10 commits into
mainfrom
dev
Mar 17, 2026
Merged

Sync 'dev' branch#8
mercyblitz merged 10 commits into
mainfrom
dev

Conversation

@mercyblitz
Copy link
Copy Markdown
Contributor

This pull request restructures the logging modules to use more consistent and descriptive naming, updates dependencies to reflect these changes, and renames core classes and files to match the new conventions. The main focus is on standardizing module names (removing the microsphere-logging- prefix where appropriate), updating the documentation and dependencies, and renaming Java classes to follow the new naming scheme.

Module and Artifact Renaming:

  • Renamed modules and artifacts for clarity and consistency:
    • microsphere-logging-jdkmicrosphere-java-logging
    • microsphere-logging-logbackmicrosphere-logback
    • microsphere-logging-log4j2microsphere-log4j2
    • microsphere-logging-coremicrosphere-logging-commons [1] [2]

Dependency and Documentation Updates:

  • Updated all module dependencies and documentation references to use the new artifact names, ensuring consistency across the project and in the README.md. [1] [2] [3] [4] [5]

Java Class and File Renaming:

  • Renamed core Java class and test files to match the new module names:
    • JDKLoggingJavaLogging [1] [2] [3]
    • Updated service loader configuration to reference the new class name.

These changes improve the clarity, maintainability, and consistency of the logging framework's structure and naming conventions.

Refactor logging module names and related artifacts: microsphere-logging-core -> microsphere-logging-commons, microsphere-logging-jdk -> microsphere-java-logging, microsphere-logging-logback -> microsphere-logback, and microsphere-logging-log4j2 -> microsphere-log4j2. Update POMs and inter-module dependencies to use the new artifactIds. Rename JDKLogging class and tests to JavaLogging (and adjust references), update the service provider file accordingly (remove old JDK entry, add JavaLogging entry). Update parent modules list and logging-dependencies / test POMs to reflect the new module names.
Update module list and dependency example to reflect refactored module names: replace microsphere-logging-core with microsphere-logging-commons, microsphere-logging-jdk with microsphere-java-logging, and rename microsphere-logging-logback/log4j2 to microsphere-logback/microsphere-log4j2. Adjust the sample dependency artifactId accordingly to keep documentation consistent with the project changes.
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ Complexity Δ
...n/java/io/microsphere/logging/jdk/JavaLogging.java 100.00% <100.00%> (ø) 9.00 <1.00> (?)
...va/io/microsphere/logging/log4j2/Log4j2Logger.java 100.00% <ø> (ø) 17.00 <0.00> (?)
...icrosphere/logging/log4j2/Log4j2LoggerFactory.java 100.00% <ø> (ø) 4.00 <0.00> (?)
...a/io/microsphere/logging/log4j2/Log4j2Logging.java 100.00% <ø> (ø) 11.00 <0.00> (?)
...o/microsphere/logging/log4j2/util/LoggerUtils.java 100.00% <ø> (ø) 14.00 <0.00> (?)
...io/microsphere/logging/logback/LogbackLogging.java 100.00% <ø> (ø) 11.00 <0.00> (?)
.../microsphere/logging/logback/util/LoggerUtils.java 100.00% <ø> (ø) 15.00 <0.00> (?)
...rosphere/logging/DefaultLoggingLevelsResolver.java 100.00% <ø> (ø) 5.00 <0.00> (?)
...main/java/io/microsphere/logging/LoggingUtils.java 100.00% <100.00%> (ø) 4.00 <2.00> (?)
.../microsphere/logging/jmx/LoggingMXBeanAdapter.java 100.00% <ø> (ø) 9.00 <0.00> (?)
... and 1 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Mar 17, 2026

🤖 Augment PR Summary

Summary: This PR syncs the dev branch by standardizing module/artifact naming across the Microsphere Logging project.

Changes:

  • Renamed Maven modules/artifacts to clearer names (e.g., microsphere-logging-coremicrosphere-logging-commons, microsphere-logging-jdkmicrosphere-java-logging)
  • Updated inter-module dependencies and the root reactor pom.xml module list to reflect new coordinates
  • Renamed the JDK logging implementation and its test (JDKLoggingJavaLogging)
  • Adjusted ServiceLoader configuration to point to the renamed implementation class
  • Updated README references to the new module/artifact names

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@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.

Comment thread README.md Outdated
Introduce LoggingUtils.load() and load(ClassLoader) to return the highest-priority Logging implementation from SPI (uses Prioritized and ServiceLoaderUtils.loadFirstService). Update Javadoc to clarify priority ordering for loadAll, add unit test (testLoad) asserting the prioritized implementation is returned, and set MAX_PRIORITY in TestingLogging by implementing getPriority(). Minor import adjustments.
Replace direct instantiation of LogbackLogging with a call to LoggingUtils.load() in the test setup and add the corresponding static import. This ensures the test uses the configured loader/factory instance (cast to LogbackLogging) rather than creating a new instance directly.
Replace the previous service loader call with LoggingUtils.load() in JavaLoggingTest#setUp. Removed the unused io.microsphere.logging.Logging import and the old loadFirstService static import, and added a static import for io.microsphere.logging.LoggingUtils.load. This simplifies obtaining the JavaLogging test instance.
Replace ServiceLoaderUtils.loadFirstService(Logging.class) with LoggingUtils.load in Log4j2LoggingTest#setUp to simplify loading the Logging implementation. Remove the now-unused io.microsphere.logging.Logging import and the static ServiceLoaderUtils import, and add a static import for LoggingUtils.load.
Deletes the microsphere-java-annotations dependency and removes the <optional>true</optional> flag from microsphere-java-core in microsphere-logging-commons/pom.xml. This ensures microsphere-java-core is always brought in and removes an unnecessary annotations dependency.
Introduce a new microsphere-logging-examples Maven module with its own POM. The module declares dependencies on microsphere-java-logging, microsphere-logback, microsphere-log4j2 and concrete Logback/Log4j2 artifacts, and disables deployment for example builds. Add a LoggingExample Java class that demonstrates loading the highest-priority Logging implementation and logging its name and logger names. Include a simple log4j2.xml that configures a console appender and root logger. Also update the parent pom.xml to register the new module.
Add Versions and Compatibility sections to README outlining supported Java, JUnit, SLF4J, Logback and Log4j2 for 0.2.x and 0.1.x. Update dependency examples to include microsphere-java-logging, microsphere-logback, microsphere-log4j2 and their runtime deps (logback, log4j2), replacing the old microsphere-logging-commons artifact in the sample. Include a Java usage example showing how to load the Logging instance and sample run output, and reference the microsphere-logging-examples module for more samples.
Replace placeholder TODOs with a brief introduction to the Microsphere Logging Framework and a concise feature list. Describes the framework purpose and key capabilities: runtime log level management, framework-agn API (Logback/Log4j2/Java Logging), JMX operational control, testing infrastructure, and multi-tenant logging configuration support.
@mercyblitz mercyblitz merged commit 18fceba into main Mar 17, 2026
7 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