#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
#include <CoreServices/CoreServices.h>
#endif
#include <algorithm>
#include <atomic>
#include <iomanip>
#include "base/logging.h"
#include "base/notreached.h"
#include "base/strings/string_util.h"
#include "base/threading/platform_thread.h"
#include "third_party/webrtc/rtc_base/string_utils.h"
#include "third_party/webrtc_overrides/rtc_base/diagnostic_logging.h"
#include "third_party/webrtc_overrides/rtc_base/logging.h"
#if defined(WEBRTC_MAC)
#include "base/apple/osstatus_logging.h"
#endif
#if defined(WEBRTC_UNSAFE_FUZZER_MODE)
#define WEBRTC_ENABLE_LOGGING …
#else
#define WEBRTC_ENABLE_LOGGING …
#endif
#define LOG_LAZY_STREAM_DIRECT(file_name, line_number, sev) …
namespace rtc {
void (*g_logging_delegate_function)(const std::string&) = …;
void (*g_extra_logging_init_function)(
void (*logging_delegate_function)(const std::string&)) = …;
#ifndef NDEBUG
std::atomic<base::PlatformThreadId> g_init_logging_delegate_thread_id = …;
#endif
inline int WebRtcSevToChromeSev(LoggingSeverity sev) { … }
inline int WebRtcVerbosityLevel(LoggingSeverity sev) { … }
static void LogExtra(std::ostringstream* print_stream,
LogErrorContext err_ctx,
int err,
const char* module) { … }
DiagnosticLogMessage::DiagnosticLogMessage(const char* file,
int line,
LoggingSeverity severity,
LogErrorContext err_ctx,
int err)
: … { … }
DiagnosticLogMessage::DiagnosticLogMessage(const char* file,
int line,
LoggingSeverity severity,
LogErrorContext err_ctx,
int err,
const char* module)
: … { … }
DiagnosticLogMessage::~DiagnosticLogMessage() { … }
void LogMessage::LogToDebug(int min_sev) { … }
void InitDiagnosticLoggingDelegateFunction(
void (*delegate)(const std::string&)) { … }
void SetExtraLoggingInit(
void (*function)(void (*delegate)(const std::string&))) { … }
bool CheckVlogIsOnHelper(rtc::LoggingSeverity severity,
const char* file,
size_t N) { … }
}