Skip to content

Add model classes for java.util.logging#609

Open
kallal79 wants to merge 1 commit intojavapathfinder:masterfrom
kallal79:fix/341-logger-model-classes
Open

Add model classes for java.util.logging#609
kallal79 wants to merge 1 commit intojavapathfinder:masterfrom
kallal79:fix/341-logger-model-classes

Conversation

@kallal79
Copy link
Copy Markdown

@kallal79 kallal79 commented Mar 6, 2026

Created lightweight model classes for Logger, LogManager, Level, Handler, StreamHandler, LogRecord, and Formatter to bypass JDK's heavy logging initialization that crashes JPF (NoSuchMethodException on Thread constructor, UnsatisfiedLinkError on VM.initializeFromArchive).

  • Logger: getLogger(), getAnonymousLogger(), all log-level methods (no-op)
  • LogManager: simple HashMap-based logger registry, avoids config file loading
  • Level: predefined constants (SEVERE, WARNING, INFO, CONFIG, FINE, etc.)
  • Handler/StreamHandler: minimal stubs supporting existing FileHandler
  • LogRecord/Formatter: stubs for Handler API compatibility
  • LoggerTest: 5 regression tests verifying getLogger, logging methods, etc.

Fixes #341

Created lightweight model classes for Logger, LogManager, Level, Handler,
StreamHandler, LogRecord, and Formatter to bypass JDK's heavy logging
initialization that crashes JPF (NoSuchMethodException on Thread constructor,
UnsatisfiedLinkError on VM.initializeFromArchive).

- Logger: getLogger(), getAnonymousLogger(), all log-level methods (no-op)
- LogManager: simple HashMap-based logger registry, avoids config file loading
- Level: predefined constants (SEVERE, WARNING, INFO, CONFIG, FINE, etc.)
- Handler/StreamHandler: minimal stubs supporting existing FileHandler
- LogRecord/Formatter: stubs for Handler API compatibility
- LoggerTest: 5 regression tests verifying getLogger, logging methods, etc.

Fixes javapathfinder#341
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.

Challenges running java.util.logging.Logger.getLogger in JPF

1 participant