Bug 1402334 - Add log level test to CSFLog; r=drno
☠☠ backed out by 0435ae6ad529 ☠ ☠
authorDan Minor <dminor@mozilla.com>
Mon, 02 Oct 2017 14:33:23 -0400
changeset 675188 de7bd38908da0ae3747bc7536b9a438e43aad495
parent 675187 4eb36d1710cadefb486a395af6f0de5363a91f4d
child 675189 978b0400ac3b1bdbb074c3a759144caec58ba90c
push id83058
push userbwerth@mozilla.com
push dateWed, 04 Oct 2017 23:14:13 +0000
reviewersdrno
bugs1402334
milestone58.0a1
Bug 1402334 - Add log level test to CSFLog; r=drno MozReview-Commit-ID: 3EKeDLAmEs0
media/webrtc/signaling/src/common/browser_logging/CSFLog.cpp
media/webrtc/signaling/src/common/browser_logging/CSFLog.h
--- a/media/webrtc/signaling/src/common/browser_logging/CSFLog.cpp
+++ b/media/webrtc/signaling/src/common/browser_logging/CSFLog.cpp
@@ -75,8 +75,13 @@ void CSFLog( CSFLogLevel priority, const
 {
 	va_list ap;
   va_start(ap, format);
 
   CSFLogV(priority, sourceFile, sourceLine, tag, format, ap);
   va_end(ap);
 }
 
+int CSFLogTestLevel(CSFLogLevel priority)
+{
+  mozilla::LogLevel level = static_cast<mozilla::LogLevel>(priority);
+  return MOZ_LOG_TEST(gSignalingLog, level);
+}
--- a/media/webrtc/signaling/src/common/browser_logging/CSFLog.h
+++ b/media/webrtc/signaling/src/common/browser_logging/CSFLog.h
@@ -33,13 +33,15 @@ extern "C"
 void CSFLog( CSFLogLevel priority, const char* sourceFile, int sourceLine, const char* tag , const char* format, ...)
 #ifdef __GNUC__
   __attribute__ ((format (printf, 5, 6)))
 #endif
 ;
 
 void CSFLogV( CSFLogLevel priority, const char* sourceFile, int sourceLine, const char* tag , const char* format, va_list args);
 
+int CSFLogTestLevel(CSFLogLevel priority);
+
 #ifdef __cplusplus
 }
 #endif
 
 #endif