-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce global effects of setting logHandler and logLevel
Currently, if you create a client with logHandler and/or logLevel options, these options will affect all existing client objects. This means that code like the following doesn’t do what you’d expect — the log messages emitted by firstClient will say "secondClient": ``` const firstClient = new Realtime({ logHandler: (msg) => console.log("firstClient: ", msg), }) const secondClient = new Realtime({ logHandler: (msg) => console.log("secondClient: ", msg), }) ``` Here we fix this as much as we can within the limitations of the existing public API. I’ve kept the Logger.logAction* static methods instead of changing them to instance methods, because that way they remain easy for our strip-logs plugin to target. Resolves #1763.
- Loading branch information
1 parent
804e85c
commit a3529af
Showing
37 changed files
with
599 additions
and
257 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.