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";
相关推荐
一只海星2 天前
webrtc入门系列(五)amazon-kinesis-video-streams-webrtc-sdk-c编译
webrtc·amazon-kinesis·webrtc编译
NoneCoder2 天前
JavaScript系列(38)-- WebRTC技术详解
开发语言·javascript·webrtc
眉梢i6 天前
pytthon实现webrtc通过whip推送实时流式音频流
音视频·webrtc
superconvert8 天前
smart_web 管理端基本说明
websocket·nginx·ffmpeg·webrtc·rtmp·hls·srt·m3u8·obs·flv·vmix
爱在拜城_sunbea9 天前
基于WebRTC实现音视频通话
音视频·webrtc·通信
EasyCVR13 天前
EasyCVR视频汇聚平台如何配置webrtc播放地址?
音视频·webrtc
wu_qz14 天前
webrtc之rtc::ArrayView<const uint8_t>
webrtc
唯独失去了从容14 天前
vs2022编译webrtc步骤
webrtc
玻璃爵迹14 天前
Qt重写webrtc的demo peerconnection
webrtc
智联视频超融合平台16 天前
WebRTC 在视频联网平台中的应用:开启实时通信新篇章
网络协议·音视频·webrtc·实时音视频·视频编解码