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";
相关推荐
唯独失去了从容7 小时前
WebRTC源码线程-1
webrtc
eguid_13 天前
WebRTC中sdp多媒体会话协议报文详细解读
音视频·webrtc·实时音视频·sdp·sdp交换·ice协商
superconvert4 天前
最快的流媒体服务器搭建 smart_rtmpd
http·webrtc·rtmp·h264·hls·无人直播·dash·rtsp·gb28181·srt·m3u8·vlc·sfu·obs·flv
_可乐无糖5 天前
AWS WebRTC:获取ICE服务地址(part 2): ICE Agent的作用
服务器·网络·webrtc
lqj_本人5 天前
鸿蒙OS&基于UniApp的WebRTC视频会议系统实践:从0到1的HarmonyOS适配之路#三方框架 #Uniapp
uni-app·webrtc·harmonyos
邪恶的贝利亚5 天前
webrtc初了解
webrtc
_可乐无糖7 天前
AWS WebRTC:获取ICE服务地址(part 3):STUN服务和TURN服务的作用
云计算·webrtc·aws
_可乐无糖9 天前
AWS WebRTC:获取ICE服务地址(part 1)
webrtc
_可乐无糖10 天前
AWS WebRTC:获取信令服务节点和ICE服务节点
webrtc
metaRTC11 天前
君正Ingenic webRTC P2P库libyangpeerconnection7编程指南
webrtc·p2p