Allow apps to control FDC3 for Web JS console logging#1495
Allow apps to control FDC3 for Web JS console logging#1495kriswest wants to merge 8 commits intofdc3-for-web-implfrom
Conversation
✅ Deploy Preview for fdc3 canceled.
|
|
/easycla |
|
|
||
| export type DesktopAgentProxyLogSettings = { | ||
| heartbeat: boolean; | ||
| debug: boolean; |
There was a problem hiding this comment.
Should this be explicit level for more refined control versus just debug yes or no?
There was a problem hiding this comment.
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"
};|
Closing in favour of #1497 which has the same changes included - might as well get these things done in one PR. |
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