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";
相关推荐
XHW___0017 小时前
webrtc 关键模块创建的时机
网络·音视频·webrtc
我真会写代码10 小时前
WebSocket:告别轮询,实现Web实时通信 WebRTC:无需插件,实现浏览器端实时音视频通信
网络·websocket·网络协议·webrtc·实时音视频
又是忙碌的一天12 小时前
SpringBoot+Vue+Netty+WebSocket+WebRTC 视频聊天实现
websocket·音视频·webrtc
柒.梧.1 天前
理解WebRTC:浏览器原生实时音视频通信
webrtc·实时音视频
XHW___0011 天前
webrtc中音频3A处理开关配置
音视频·webrtc
sin22011 天前
WebRTC--流程
spring boot·webrtc
runner365.git2 天前
webrtc服务端如何录像
webrtc·录像·fmp4·mpegts
大佐不会说日语~4 天前
WebRTC技术实现简易直播平台
webrtc
YRYDZFtyVKg6 天前
光伏MPPT仿真之扰动观察法探索
webrtc
Knight_AL11 天前
WebRTC / HLS / HTTP-FLV 的本质区别与选型指南
网络协议·http·webrtc