WebRTC 日志

WebRTC 日志

flyfish

WebRTC支持的日志等级

cpp 复制代码
//
// The meanings of the levels are:
//  LS_VERBOSE: This level is for data which we do not want to appear in the
//   normal debug log, but should appear in diagnostic logs.
//  LS_INFO: Chatty level used in debugging for all sorts of things, the default
//   in debug builds.
//  LS_WARNING: Something that may warrant investigation.
//  LS_ERROR: Something that should not have occurred.
//  LS_NONE: Don't log.
enum LoggingSeverity {
  LS_VERBOSE,
  LS_INFO,
  LS_WARNING,
  LS_ERROR,
  LS_NONE,
};

源码所在路径

cpp 复制代码
webrtc/src/rtc_base/logging.h

使用方法

头文件

cpp 复制代码
#include "rtc_base/logging.h"

初始化

cpp 复制代码
rtc::LogMessage::LogToDebug((rtc::LoggingSeverity)rtc::LS_VERBOSE);

rtc::LogMessage::LogTimestamps();
rtc::LogMessage::LogThreads();
std::cout << "Logger level:" <<  rtc::LogMessage::GetLogToDebug() << std::endl;

调用方法

cpp 复制代码
RTC_LOG(LS_INFO) << "nb video devices:" << num_videoDevices;
RTC_LOG(LS_ERROR) << "LiveAudioSource::onNewSession not support codec" << sdp;
RTC_LOG(LS_VERBOSE) << "LiveVideoSource:onData SPS";
相关推荐
Pending19 小时前
从 400 行到 40 行:一个 WebRTC 播放器的简洁实现之道
开源·webrtc·前端工程化
CrystalShaw2 天前
WebRTC原生PLC VS SILK之PLC
webrtc
乐鑫科技 Espressif3 天前
亚马逊 KVS WebRTC SDK 适配乐鑫芯片及 ESP RainMaker Camera
人工智能·webrtc·乐鑫科技
糖炒栗子03264 天前
SRS + FFmpeg WebRTC 循环推流环境搭建
ffmpeg·webrtc
EasyDSS4 天前
EasyDSS校园数字化WebRTC私有化部署企业级融媒体系统设计方案解析
webrtc·媒体·ai大模型·m3u8·语音转写·点播技术
RTC老炮5 天前
webrtc弱网-BBRv2算法原理
网络·算法·webrtc
RTC老炮5 天前
webrtc弱网-BBRv1算法原理
网络·算法·webrtc
爱学习的程序媛7 天前
Windows系统下安装与配置FreeSWITCH完整指南
windows·实时互动·webrtc·实时音视频·信息与通信·媒体
xiejiashu7 天前
EasyRTC成功发布!原生WebRTC/嵌入式WebRTC,Windows/Linux/Android/ARM全支持
webrtc·嵌入式webrtc·easyrtc·webrtc原生库·arm-webrtc
爱学习的程序媛9 天前
【WebRTC】呼叫中心前端技术选型:SIP.js vs JsSIP vs Verto
前端·javascript·typescript·音视频·webrtc·实时音视频·web