Sync library#972
Open
yosif111 wants to merge 3 commits into
Open
Conversation
- Add static setters: setDefaultDebugLog, setDefaultWarnLog, setDefaultErrorLog
- Add static methods: enable, disable
- Export Logger class from main module
- Add TypeScript definitions for Logger class
- Enables custom logging integration (e.g., Sentry, remote logging)
Based on xcally/JsSIP#intercept-debug but applied to latest v3.10.1
This allows applications to intercept and redirect all JsSIP log output
(debug, warn, error levels) to custom handlers for remote monitoring,
analytics, or integration with logging services like Sentry.
Example usage:
import * as JsSIP from 'jssip';
JsSIP.Logger.setDefaultDebugLog((...args) => {
console.debug(...args);
sentryLog(args.join(' '));
});
JsSIP.Logger.enable('JsSIP:*');
- Import Socket and WeightedSocket from './Socket' not './WebSocketInterface' - Fix debug.enable signature: use (namespaces: string) instead of (...namespaces?:string)
The lib-es5 directory is only created during npm publish via the prepublishOnly script. For development installs from GitHub, the source files in lib/ should be used directly. This allows Metro bundler to resolve the module correctly.
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.
No description provided.