Index: overrides/webrtc/base/logging.h |
diff --git a/overrides/webrtc/base/logging.h b/overrides/webrtc/base/logging.h |
index a6a63a06846d8096521c9b8fe94cbd309e5269b6..4b3766a5110252b7a189967d0406d6bf4559b222 100644 |
--- a/overrides/webrtc/base/logging.h |
+++ b/overrides/webrtc/base/logging.h |
@@ -38,15 +38,25 @@ |
#if defined(LOGGING_INSIDE_WEBRTC) |
-#define WEBRTC_VLOG_IS_ON(sev) VLOG_IS_ON(rtc::WebRtcVerbosityLevel(sev)) |
+namespace rtc { |
+ |
+// Note that |N| is the size *with* the null terminator. |
+bool CheckVlogIsOnHelper(LoggingSeverity severity, |
+ const char* file, size_t N); |
+ |
+template <size_t N> |
+bool CheckVlogIsOn(LoggingSeverity severity, const char (&file)[N]) { |
+ return CheckVlogIsOnHelper(severity, file, N); |
+} |
+ |
+} // namespace rtc |
#define DIAGNOSTIC_LOG(sev, ctx, err, ...) \ |
rtc::DiagnosticLogMessage( \ |
- __FILE__, __LINE__, sev, WEBRTC_VLOG_IS_ON(sev), \ |
- rtc::ERRCTX_ ## ctx, err, ##__VA_ARGS__).stream() |
+ __FILE__, __LINE__, sev, rtc::ERRCTX_ ## ctx, err, ##__VA_ARGS__).stream() |
-#define LOG_RTC_CHECK_LEVEL(sev) WEBRTC_VLOG_IS_ON(rtc::sev) |
-#define LOG_RTC_CHECK_LEVEL_V(sev) WEBRTC_VLOG_IS_ON(sev) |
+#define LOG_RTC_CHECK_LEVEL(sev) CheckVlogIsOn(rtc::sev, __FILE__) |
+#define LOG_RTC_CHECK_LEVEL_V(sev) CheckVlogIsOn(sev, __FILE__) |
#define LOG_V(sev) DIAGNOSTIC_LOG(sev, NONE, 0) |
#undef LOG |