Integrate logger client into cdp-client with service-based discovery#27
Open
stefanrammo wants to merge 1 commit intomainfrom
Open
Integrate logger client into cdp-client with service-based discovery#27stefanrammo wants to merge 1 commit intomainfrom
stefanrammo wants to merge 1 commit intomainfrom
Conversation
Bundle cdplogger-client as studio.logger and add client.logger() method
that discovers loggers via ServicesNotification and connects through
proxy transport via makeServiceTransport (CDP 5.1+).
- client.logger(name, options): auto-discovers logserver proxy service,
creates service transport, passes to LoggerClient constructor
- client.loggers(): returns all discovered logger services as
[{name, metadata}] after first ServicesNotification
- LoggerClient constructor extended to accept service transport object
in addition to endpoint string (autoReconnect forced false)
- Caching by name with eviction on transport close
- close() disconnects cached loggers and rejects pending promises
- Logger transports registered in serviceConnections for proper
cleanup on primary connection drop
- Rejects immediately on CDP < 5.1 (no proxy protocol support)
- Proto files use raw .proto.js format matching studioapi.proto.js,
with Node/browser parity via require() and window globals
- Unit tests adapted from cdplogger-client test suite
- README.rst updated with Logger Integration API documentation
Collaborator
Author
|
The bundled logger client is adapted from https://github.com/CDPTechnologies/JavascriptCDPLoggerClient with these changes to support integration:
|
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.
Bundle cdplogger-client as studio.logger and add client.logger() method that discovers loggers via ServicesNotification and connects through proxy transport via makeServiceTransport (CDP 5.1+).