chore: migrate from base-logging to base-telemetry across spawn - #57
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
build.base.logging(backed byjava.util.logging) is being retired in favor ofbuild.base.telemetry, which is designed for end-user-facing diagnostics rather than developer-only log output. This PR replaces everyLoggerusage inspawn-application,spawn-docker-jdk,spawn-local-jdk, andspawn-local-platformwithTelemetryRecorder, and updates each module'spom.xmlandmodule-info.javaaccordingly.AbstractTemplatedLauncherandAbstractTemplatedPlatformnow expose aTelemetryRecorder-- the launcher gets one via@Inject, consistent with its existinguniqueNameGenerator,diagnostics, andplatformContextfields, while the platform constructs one directly from a newTelemetryRecorderFactoryconstructor parameter (defaulting toSystemTelemetryRecorder::of) and binds it into the injectionContextso launchers can pick it up.JsonNodeInputStreamProcessor,JDKDetector, andJDKHomeBasedPatternDetectoreach gained aTelemetryRecorder-accepting constructor alongside a no-arg convenience constructor that defaults to aPrintStreamTelemetryRecorderwriting toSystem.out/System.err.Because
TelemetryRecordermethods format messages withjava.util.Formattersemantics rather thanMessageFormat, all{0}-style placeholders were rewritten to%s.JDKHomeBasedPatternDetector.expandPatternandexpandGlobPatternalso moved fromstaticto instance methods since they now depend on the instance'srecorder, which required updating call sites inJDKHomeBasedPatternDetectorGlobExpansionTestsandJDKHomeBasedPatternDetectorPruningTeststo use a detector instance instead of the class reference.JDKHomeBasedPatternDetectorLogTestswas rewritten to assert against telemetry output viaObservableTelemetryRecorderandNoOpTelemetryRecorderinstead of installing ajava.util.logging.Handler, removing a previous caveat that the test could pass vacuously if the logging backend changed.