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";
相关推荐
achene_ql1 天前
WebRTC:去中心化网络P2P框架解析
网络·去中心化·webrtc·p2p
唯独失去了从容2 天前
WebRTC通信原理与流程
webrtc
拧螺丝专业户2 天前
外网访问内网海康威视监控视频的方案:WebRTC + Coturn 搭建
音视频·webrtc·监控视频
唯独失去了从容4 天前
WebRTC 源码原生端Demo入门-1
webrtc
eguid_14 天前
WebRTC流媒体传输协议RTP点到点传输协议介绍,WebRTC为什么使用RTP协议传输音视频流?
java·网络协议·音视频·webrtc·实时音视频
eguid_14 天前
WebRTC工作原理详细介绍、WebRTC信令交互过程和WebRTC流媒体传输协议介绍
java·音视频·webrtc·实时音视频
程序猿阿伟4 天前
《探索React Native社交应用中WebRTC实现低延迟音视频通话的奥秘》
react native·音视频·webrtc
travel_wsy5 天前
webrtc 视频直播
前端·vue.js·音视频·webrtc
从后端到QT5 天前
SRS流媒体服务器(1)概述和环境搭建
webrtc
25March6 天前
如何测试 esp-webrtc-solution_solutions_doorbell_demo 例程?
物联网·webrtc·iot