Skip to content

Sync library#972

Open
yosif111 wants to merge 3 commits into
versatica:masterfrom
Voxasa:master
Open

Sync library#972
yosif111 wants to merge 3 commits into
versatica:masterfrom
Voxasa:master

Conversation

@yosif111

@yosif111 yosif111 commented Jul 4, 2026

Copy link
Copy Markdown

No description provided.

- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants