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";
相关推荐
JellyDDD33 分钟前
【悬赏】Android WebRTC 数字人项目回声问题排查(AEC / AudioMode)
音视频·webrtc
好游科技15 小时前
语聊APP新生态!一站式语聊房语音直播APP源码开发搭建
音视频·webrtc·im即时通讯·社交软件·社交语音视频软件
刘孬孬沉迷学习1 天前
WebRTC 协议
学习·5g·webrtc·信息与通信·信号处理
XHW___0011 天前
鸿蒙webrtc编译
华为·webrtc·harmonyos
jinxinyuuuus2 天前
局域网文件传输:WebRTC与“去中心化应用”的架构思想
架构·去中心化·webrtc
kkk_皮蛋2 天前
信令是什么?为什么 WebRTC 需要信令?
后端·asp.net·webrtc
XHW___0012 天前
webrtc 联播数据编码发送流程
webrtc
kkk_皮蛋3 天前
写一个最简单的 WebRTC Demo(实操篇)
webrtc
kkk_皮蛋3 天前
WebRTC 架构概览(整体框架篇)
webrtc
联系QQ8762239654 天前
基于模型预测MPC的燃油汽车车速控制探索
webrtc