Skip to content

Add java.util.logging core APIs - #198

Merged
dlunch merged 2 commits into
mainfrom
agent/java-util-logging
Aug 9, 2026
Merged

Add java.util.logging core APIs#198
dlunch merged 2 commits into
mainfrom
agent/java-util-logging

Conversation

@dlunch

Copy link
Copy Markdown
Owner

Summary

  • add the CLDC 8 logging core with common Java 1.4 Logger APIs
  • support logger hierarchy, levels, filters, handlers, stream formatting, and reset behavior
  • register the package and cover API behavior with java_runtime tests

Verification

  • cargo test -p java_runtime --no-fail-fast -q
  • cargo fmt --all -- --check
  • cargo clippy -p java_runtime --all-targets -- -D warnings

CopilotAI lite review requested due to automatic review settings August 9, 2026 10:46
@codecov

codecovBot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.88712% with 780 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.61%. Comparing base (5fbb27b) to head (5359f5e).

Files with missing linesPatch %Lines
...va_runtime/src/classes/java/util/logging/logger.rs48.90%561 Missing ⚠️
...me/src/classes/java/util/logging/stream_handler.rs73.07%77 Missing ⚠️
...untime/src/classes/java/util/logging/log_record.rs81.38%43 Missing ⚠️
...ava_runtime/src/classes/java/util/logging/level.rs86.72%32 Missing ⚠️
...a_runtime/src/classes/java/util/logging/handler.rs80.43%27 Missing ⚠️
...e/src/classes/java/util/logging/console_handler.rs70.45%13 Missing ⚠️
...ntime/src/classes/java/util/logging/log_manager.rs94.82%13 Missing ⚠️
...runtime/src/classes/java/util/logging/formatter.rs93.96%7 Missing ⚠️
.../src/classes/java/util/logging/simple_formatter.rs91.02%7 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #198 +/- ##
==========================================
- Coverage 87.74% 86.61% -1.14% 
==========================================
Files 298 308 +10 Lines 39025 41532 +2507 ==========================================
+ Hits 34244 35972 +1728 - Misses 4781 5560 +779 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a Rust-backed implementation of core java.util.logging APIs to the java_runtime crate (CLDC 8 / Java 1.4-style surface), wires the new runtime classes into the class loader, and introduces JVM-level tests validating key behaviors like hierarchy, filtering, formatting, and reset semantics.

Changes:

  • Implement java.util.logging runtime classes (Logger, LogManager, Level, LogRecord, Handler/StreamHandler/ConsoleHandler, Formatter/SimpleFormatter, Filter).
  • Register the new logging classes in java_runtime’s runtime class loader and expose the module under java::util.
  • Add java_runtime tests covering registration and major API behaviors (levels, records, handlers, logger propagation, reset).

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
java_runtime/src/classes/java/util.rsExposes the new util::logging module from the Java runtime.
java_runtime/src/classes/java/util/logging.rsDeclares and re-exports the java.util.logging runtime types.
java_runtime/src/classes/java/util/logging/console_handler.rsImplements ConsoleHandler backed by System.err via StreamHandler.
java_runtime/src/classes/java/util/logging/filter.rsAdds the Filter interface definition.
java_runtime/src/classes/java/util/logging/formatter.rsAdds base Formatter including formatMessage parameter substitution support.
java_runtime/src/classes/java/util/logging/handler.rsImplements Handler base behavior (level/filter/encoding/formatter management).
java_runtime/src/classes/java/util/logging/level.rsImplements Level constants and parsing behavior.
java_runtime/src/classes/java/util/logging/log_manager.rsImplements LogManager singleton, logger registry, hierarchy re-parenting, and reset.
java_runtime/src/classes/java/util/logging/log_record.rsImplements LogRecord storage, metadata initialization, and sequence allocation.
java_runtime/src/classes/java/util/logging/logger.rsImplements Logger creation, hierarchy, handlers, filtering, and convenience logging methods.
java_runtime/src/classes/java/util/logging/simple_formatter.rsImplements SimpleFormatter formatting for LogRecord.
java_runtime/src/classes/java/util/logging/stream_handler.rsImplements StreamHandler writing formatted records to an OutputStream.
java_runtime/src/loader.rsRegisters java/util/logging/* runtime class protos so they can be loaded.
java_runtime/tests/classes/java/util/mod.rsHooks java.util.logging test module into the java.util test suite.
java_runtime/tests/classes/java/util/logging/mod.rsAdds the logging test module root.
java_runtime/tests/classes/java/util/logging/test_handlers.rsTests StreamHandler filtering/leveling and Formatter.formatMessage parameter substitution.
java_runtime/tests/classes/java/util/logging/test_level.rsTests class registration metadata and Level constants/parse behavior.
java_runtime/tests/classes/java/util/logging/test_log_record.rsTests LogRecord metadata initialization, sequencing, and null-level rejection.
java_runtime/tests/classes/java/util/logging/test_logger.rsTests logger reuse, hierarchy re-parenting, propagation control, and LogManager reset behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment threadjava_runtime/src/classes/java/util/logging/level.rs
Comment threadjava_runtime/src/classes/java/util/logging/logger.rs
Comment threadjava_runtime/src/classes/java/util/logging/log_manager.rs

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:5b06037ca9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadjava_runtime/src/classes/java/util/logging/stream_handler.rs Outdated
Comment threadjava_runtime/src/classes/java/util/logging/logger.rs
Comment threadjava_runtime/src/classes/java/util/logging/formatter.rs Outdated
Comment threadjava_runtime/src/classes/java/util/logging/simple_formatter.rs Outdated
Comment threadjava_runtime/src/classes/java/util/logging/log_record.rs
@dlunch
dlunch merged commit a1e6fdf into mainAug 9, 2026
13 of 15 checks passed
@dlunch
dlunch deleted the agent/java-util-logging branch August 9, 2026 11:02
Sign up for freeto 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.

2 participants

@dlunch