-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow apps to control FDC3 for Web JS console logging #1495
base: fdc3-for-web-impl
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for fdc3 canceled.
|
/easycla |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
||
export type DesktopAgentProxyLogSettings = { | ||
heartbeat: boolean; | ||
debug: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be explicit level for more refined control versus just debug yes or no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its does feel a little scrappy this way, but the issue is we've got two scopes to control logging in: the connection phase and the proxy itself + within the proxy there are two types of debug message that we need to keep separate for usability: logging API messages sent/received and logging heartbeat messages. Collectively, that made it a little harder to base purely on a log level.
I suppose one solution would be to move the message logging in the proxy to the log level but set the default level to warn...
The current proposed args are:
export type GetAgentLogSettings = {
connection: boolean, //default true
connectionDebug: boolean, //default false
proxyDebug: boolean, //default false
heartbeat: boolean // default false
};
By moving message loggimg to the log level we could do:
export type GetAgentLogSettings = {
connectionLogLevel: "debug" | "log" | "warn" | "error" , //default "log"
proxyLogLevel: boolean, "debug" | "log" | "warn" | "error" , //default "warn"
};
Describe your change
Adds the ability to control debug logging output from
getAgent()
and the DesktopAgentProxy via new arguments togetAgent()
. The new arguments are documented in the types and documentation pages.Docs changes can be found in the preview at: https://deploy-preview-1495--fdc3.netlify.app/docs/next/api/ref/GetAgent
Related Issue
resolves #1487
Contributor License Agreement
Review Checklist
DesktopAgent
,Channel
,PrivateChannel
,Listener
,Bridging
)?JSDoc comments on interfaces and types should be matched to the main documentation in /docs