Logging broken in media/webrtc/signaling/test

RESOLVED FIXED in Firefox 51

Status

()

defect
P2
normal
Rank:
21
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mjf, Assigned: mjf)

Tracking

unspecified
mozilla51
Points:
---

Firefox Tracking Flags

(firefox51 fixed)

Details

Attachments

(1 attachment)

None of the test executables under media/webrtc/signaling/test are logging due to this: https://dxr.mozilla.org/mozilla-central/source/media/webrtc/signaling/test/FakeLogging.h#12
Rank: 21
Priority: -- → P2
Looks like this should fix it:
diff --git a/media/webrtc/signaling/test/FakeLogging.h b/media/webrtc/signaling/test/FakeLogging.h
--- a/media/webrtc/signaling/test/FakeLogging.h
+++ b/media/webrtc/signaling/test/FakeLogging.h
@@ -4,13 +4,23 @@

 #ifndef FakeLogging_h
 #define FakeLogging_h

 namespace mozilla {
 namespace detail {
 void log_print(const PRLogModuleInfo* aModule,
                       LogLevel aLevel,
-                      const char* aFmt, ...) { }
+                      const char* aFmt, ...)
+  {
+    // copied from Logging.cpp:#48-53
+    va_list ap;
+    va_start(ap, aFmt);
+    char* buff = PR_vsmprintf(aFmt, ap);
+    PR_LogPrint("%s", buff);
+    PR_smprintf_free(buff);
+    va_end(ap);
+  }
+
 }
 }

 #endif
Assignee: nobody → mfroman
Attachment #8785126 - Flags: review?(drno)
Comment on attachment 8785126 [details]
Bug 1298189 - implement logging in FakeLogging.h so we get logs when running tests.

https://reviewboard.mozilla.org/r/74434/#review72536
Attachment #8785126 - Flags: review?(drno) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/2ad5a1276f73
implement logging in FakeLogging.h so we get logs when running tests. r=drno
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2ad5a1276f73
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.