Skip to content

chore: replace base-logging with TelemetryRecorder in remaining modules - #99

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

deer merged 1 commit into
mainfrom
remove_logging

Conversation

@deer

@deer deer commented Aug 28, 2026

Copy link
Copy Markdown
Owner

This finishes the migration off build.base.logging that commit #98 started, converting the last modules that still used Logger (serve-application, serve-transport-http, serve-auth, serve-cors, serve-devtools, and serve-logging) to record through TelemetryRecorder instead. The base-logging dependency is dropped from the parent pom.xml, from serve-application, and from each converted module's pom.xml and module-info.java, replaced by base-telemetry plus base-telemetry-foundation.

Each module that previously held a private static final Logger now defines a PrintStreamTelemetryRecorder default keyed by a serve://<module> URI writing to System.out/System.err. In serve-application this default lives in a new package-private ApplicationTelemetry class; ServerApplication.Implementation now carries an instance recorder field that Launcher overrides via a new package-private recorder(TelemetryRecorder) setter with the recorder bound into the injection Context, so lifecycle log lines and the launch-failure fatal(...) 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 and https(...) overloads, ApiKeyStrategy.fromQueryParam(...), CorsMiddleware.allowAll(...), ChromeDevToolsHandler.forWorkspace(...), LiveReload.watching(...), and a RequestLoggingMiddleware.Builder.recorder(...) method. The no-recorder overloads delegate to the new ones with the module default, so callers that do not care are unaffected. LiveReload and RequestLoggingMiddleware now hold the recorder as an instance field so per-instance configuration is honored. A new HttpTransport.https(...) overload also threads RequestTimeout alongside the recorder, closing a gap where every other https(...) path defaulted to RequestTimeout.NONE. The security warnings emitted by fromQueryParam, allowAll, and forWorkspace are preserved verbatim, now sent through recorder.warn(...).

@deer
deer merged commit e247ef8 into main Aug 28, 2026
2 checks passed
@deer
deer deleted the remove_logging branch August 28, 2026 19:31
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