versatica / mediasoup

Cutting Edge WebRTC Video Conferencing
https://mediasoup.org
ISC License
6.27k stars 1.13k forks source link

Node: New setLogEventListeners() utility to get log events #1448

Closed ibc closed 2 months ago

ibc commented 2 months ago

Details

Usage example

mediasoup.setLogEventListeners({
  ondebug: undefined,
  onwarn: (namespace: string, log: string) => {
    MyEnterpriseLogger.warn(`${namespace} ${log}`);
  },
  onerror: (namespace: string, log: string, error?: Error) => {
    if (error) {
      MyEnterpriseLogger.error(`${namespace} ${log}: ${error}`);
    } else {
      MyEnterpriseLogger.error(`${namespace} ${log}`);
    }
  }
});

Notes