Skip to content

chore: migrate from base-logging to base-telemetry across spawn - #57

Merged
deer merged 1 commit into
mainfrom
remove_logging
Aug 4, 2026
Merged

chore: migrate from base-logging to base-telemetry across spawn#57
deer merged 1 commit into
mainfrom
remove_logging

Conversation

@deer

@deer deer commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

build.base.logging (backed by java.util.logging) is being retired in favor of build.base.telemetry, which is designed for end-user-facing diagnostics rather than developer-only log output. This PR replaces every Logger usage in spawn-application, spawn-docker-jdk, spawn-local-jdk, and spawn-local-platform with TelemetryRecorder, and updates each module's pom.xml and module-info.java accordingly.

AbstractTemplatedLauncher and AbstractTemplatedPlatform now expose a TelemetryRecorder -- the launcher gets one via @Inject, consistent with its existing uniqueNameGenerator, diagnostics, and platformContext fields, while the platform constructs one directly from a new TelemetryRecorderFactory constructor parameter (defaulting to SystemTelemetryRecorder::of) and binds it into the injection Context so launchers can pick it up. JsonNodeInputStreamProcessor, JDKDetector, and JDKHomeBasedPatternDetector each gained a TelemetryRecorder-accepting constructor alongside a no-arg convenience constructor that defaults to a PrintStreamTelemetryRecorder writing to System.out/System.err.

Because TelemetryRecorder methods format messages with java.util.Formatter semantics rather than MessageFormat, all {0}-style placeholders were rewritten to %s. JDKHomeBasedPatternDetector.expandPattern and expandGlobPattern also moved from static to instance methods since they now depend on the instance's recorder, which required updating call sites in JDKHomeBasedPatternDetectorGlobExpansionTests and JDKHomeBasedPatternDetectorPruningTests to use a detector instance instead of the class reference.

JDKHomeBasedPatternDetectorLogTests was rewritten to assert against telemetry output via ObservableTelemetryRecorder and NoOpTelemetryRecorder instead of installing a java.util.logging.Handler, removing a previous caveat that the test could pass vacuously if the logging backend changed.

@deer
deer merged commit ec915e2 into main Aug 4, 2026
1 check passed
@deer
deer deleted the remove_logging branch August 4, 2026 15:23
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