chore: replace base-logging with TelemetryRecorder in remaining modules - #99
Merged
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.
This finishes the migration off
build.base.loggingthat commit #98 started, converting the last modules that still usedLogger(serve-application,serve-transport-http,serve-auth,serve-cors,serve-devtools, andserve-logging) to record throughTelemetryRecorderinstead. Thebase-loggingdependency is dropped from the parentpom.xml, fromserve-application, and from each converted module'spom.xmlandmodule-info.java, replaced bybase-telemetryplusbase-telemetry-foundation.Each module that previously held a
private static final Loggernow defines aPrintStreamTelemetryRecorderdefault keyed by aserve://<module>URI writing toSystem.out/System.err. Inserve-applicationthis default lives in a new package-privateApplicationTelemetryclass;ServerApplication.Implementationnow carries an instancerecorderfield thatLauncheroverrides via a new package-privaterecorder(TelemetryRecorder)setter with the recorder bound into the injectionContext, so lifecycle log lines and the launch-failurefatal(...)call go through the same recorder the application uses elsewhere.Public factory and builder APIs gain recorder-accepting overloads rather than changing existing signatures:
Launcher.launch(...),HttpTransport's constructors andhttps(...)overloads,ApiKeyStrategy.fromQueryParam(...),CorsMiddleware.allowAll(...),ChromeDevToolsHandler.forWorkspace(...),LiveReload.watching(...), and aRequestLoggingMiddleware.Builder.recorder(...)method. The no-recorder overloads delegate to the new ones with the module default, so callers that do not care are unaffected.LiveReloadandRequestLoggingMiddlewarenow hold the recorder as an instance field so per-instance configuration is honored. A newHttpTransport.https(...)overload also threadsRequestTimeoutalongside the recorder, closing a gap where every otherhttps(...)path defaulted toRequestTimeout.NONE. The security warnings emitted byfromQueryParam,allowAll, andforWorkspaceare preserved verbatim, now sent throughrecorder.warn(...).