diff options
author | Roxanne Skelly <roxie@lindenlab.com> | 2024-08-01 09:33:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-01 09:33:33 -0700 |
commit | 5f66a15142083a047ac945da94f167c24c95f49a (patch) | |
tree | 1f88fac45393977ec286e2635f2ff08ab608e830 /indra/newview/llvoicewebrtc.cpp | |
parent | 89d5e8bf4fc481be08800a30c1fe14baa170ba7e (diff) | |
parent | b9c222dfaeb4531f91f6e0bb02bb4b0da599d08b (diff) |
Merge pull request #2162 from secondlife/roxie/webrtc-voice-crash-detect
[WebRTC] Implement a Logging Sink for WebRTC
Diffstat (limited to 'indra/newview/llvoicewebrtc.cpp')
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index c6cc2a053a..3164886494 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -250,7 +250,7 @@ LLWebRTCVoiceClient::~LLWebRTCVoiceClient() void LLWebRTCVoiceClient::init(LLPumpIO* pump) { // constructor will set up LLVoiceClient::getInstance() - llwebrtc::init(); + llwebrtc::init(this); mWebRTCDeviceInterface = llwebrtc::getDeviceInterface(); mWebRTCDeviceInterface->setDevicesObserver(this); @@ -281,6 +281,29 @@ void LLWebRTCVoiceClient::cleanUp() LL_DEBUGS("Voice") << "Exiting" << LL_ENDL; } +void LLWebRTCVoiceClient::LogMessage(llwebrtc::LLWebRTCLogCallback::LogLevel level, const std::string& message) +{ + switch (level) + { + case llwebrtc::LLWebRTCLogCallback::LOG_LEVEL_VERBOSE: + LL_DEBUGS("Voice") << message << LL_ENDL; + break; + case llwebrtc::LLWebRTCLogCallback::LOG_LEVEL_INFO: + LL_INFOS("Voice") << message << LL_ENDL; + break; + case llwebrtc::LLWebRTCLogCallback::LOG_LEVEL_WARNING: + LL_WARNS("Voice") << message << LL_ENDL; + break; + case llwebrtc::LLWebRTCLogCallback::LOG_LEVEL_ERROR: + // use WARN so that we don't crash on a webrtc error. + // webrtc will force a crash on a fatal error. + LL_WARNS("Voice") << message << LL_ENDL; + break; + default: + break; + } +} + // -------------------------------------------------- const LLVoiceVersionInfo& LLWebRTCVoiceClient::getVersion() |