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";
相关推荐
好多渔鱼好多1 天前
【流媒体协议】WebRTC 技术详解
webrtc
txp玩Linux1 天前
webrtc降噪模块NS源码解析(1)
webrtc
鲲鹏混子鱼1 天前
WebRTC P2P信令服务架构设计文档
网络协议·webrtc·p2p
平行云8 天前
实时云渲染支持数字孪生智能工厂:迈向“零原型”制造
人工智能·unity·ue5·云计算·webrtc·制造·实时云渲染
笔夏9 天前
【安卓学习之webRTC】学习相关资料
android·学习·webrtc
每日出拳老爷子9 天前
【浏览器方案】只用浏览器访问的内网会议系统设计思路(无客户端)
运维·服务器·webrtc·实时音视频·流媒体
softshow102612 天前
Vue3 :封装 WebRTC 低延迟视频流与 WebSocket 实时状态驱动的大屏可视化
websocket·网络协议·webrtc
雨落秋垣14 天前
大屏可视化系统:WebRTC视频流与WebSocket实时数据集成方案
websocket·网络协议·webrtc
此颜差矣。15 天前
封装 WebRTC 低延迟视频流与 WebSocket 实时状态驱动的大屏可视化
websocket·webrtc·低延迟视频流