Media/WebRTC/Logging: Difference between revisions

Jump to navigation Jump to search
s/MOZ_LOG/MOZ_LOG_MODULES
(Replacing NSPR_LOG with MOZ_LOG)
(s/MOZ_LOG/MOZ_LOG_MODULES)
Line 5: Line 5:


Environment variable changes:
Environment variable changes:
* MOZ_LOG now takes the place of NSPR_LOG_MODULES
* MOZ_LOG_MODULES now takes the place of NSPR_LOG_MODULES
* MOZ_LOG_FILE now takes the place of NSPR_LOG_FILE
* MOZ_LOG_FILE now takes the place of NSPR_LOG_FILE
* Avoid having both NSPR_$FOO and MOZ_$FOO set.
* Avoid having both NSPR_$FOO and MOZ_$FOO set.
Line 20: Line 20:


This uses the normal Mozilla [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/Logging NSPR logging] infrastructure, which uses a comma-separated list of modules, each one with its indicated [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_MODULES NSPR log level]. For WebRTC, you'll be most interested in
This uses the normal Mozilla [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/Logging NSPR logging] infrastructure, which uses a comma-separated list of modules, each one with its indicated [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_MODULES NSPR log level]. For WebRTC, you'll be most interested in
* MOZ_LOG=signaling:5,mtransport:5
* MOZ_LOG_MODULES=signaling:5,mtransport:5
* MOZ_LOG_FILE=/path/to/nspr.log (if you don't want the default stderr)
* MOZ_LOG_FILE=/path/to/nspr.log (if you don't want the default stderr)


Line 26: Line 26:


=== getUserMedia ===
=== getUserMedia ===
To log getUserMedia stuff, use MOZ_LOG=MediaManager:5,GetUserMedia:5.  For frame-by-frame logging, use MediaManager:6
To log getUserMedia stuff, use MOZ_LOG_MODULES=MediaManager:5,GetUserMedia:5.  For frame-by-frame logging, use MediaManager:6


=== Media (the GIPS stack: RTP/RTCP) ===
=== Media (the GIPS stack: RTP/RTCP) ===
Line 32: Line 32:
This also uses the Mozilla logging infrastructure, but it uses a bitmask to select which items are logged, instead of the default log levels. It also logs to a different destination by default.
This also uses the Mozilla logging infrastructure, but it uses a bitmask to select which items are logged, instead of the default log levels. It also logs to a different destination by default.


* MOZ_LOG=webrtc_trace:65535
* MOZ_LOG_MODULES=webrtc_trace:65535
* WEBRTC_TRACE_FILE=/path/to/WebRTC.log (the default is just "WebRTC.log")
* WEBRTC_TRACE_FILE=/path/to/WebRTC.log (the default is just "WebRTC.log")
** If WEBRTC_TRACE_FILE=nspr, the logs will be inserted into the NSPR logs.  Note this may have a major performance impact.
** If WEBRTC_TRACE_FILE=nspr, the logs will be inserted into the NSPR logs.  Note this may have a major performance impact.


The full list of logging options is found in the TraceLevel enum (see <http://mxr.mozilla.org/mozilla-central/source/media/webrtc/trunk/webrtc/common_types.h#83>).
The full list of logging options is found in the TraceLevel enum (see <http://mxr.mozilla.org/mozilla-central/source/media/webrtc/trunk/webrtc/common_types.h#83>).
Confirmed users
147

edits

Navigation menu