Confirmed users
325
edits
(Missed one.) |
(MOZ_LOG, etc) |
||
Line 3: | Line 3: | ||
=== Note about NSPR and MOZ_LOG === | === Note about NSPR and MOZ_LOG === | ||
NSPR has been deprecated in favor of [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Gecko_Logging MOZ_LOG]. | NSPR has been deprecated in favor of [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Gecko_Logging MOZ_LOG]. | ||
However, these are two parallel logging systems and | However, these are two parallel logging systems and some webrtc code still uses NSPR. Until Firefox 54, the MOZ_LOG* variables can not be used to control all webrtc logging (in particular 'signaling' and 'webrtc_trace' can't). Note also that MOZ_LOG is case-sensitive, while NSPR_LOG_MODULES is not. | ||
=== ICE/STUN/TURN === | === ICE/STUN/TURN === | ||
Line 20: | Line 20: | ||
You can also add ",timestamp" to that list if you want each log message to include timestamps. Other options are available as well, and they are detailed under "Description" on the [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_MODULES NSPR LOG MODULES] MDN page. | You can also add ",timestamp" to that list if you want each log message to include timestamps. Other options are available as well, and they are detailed under "Description" on the [https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_MODULES NSPR LOG MODULES] MDN page. | ||
=== getUserMedia === | === getUserMedia and others === | ||
To log getUserMedia stuff, use NSPR_LOG_MODULES=MediaManager: | To log getUserMedia stuff, use NSPR_LOG_MODULES=MediaManager:4,GetUserMedia:4. For frame-by-frame logging, use MediaManager:5 | ||
Camera-specific logging modules: CamerasParent and CamerasChild | |||
DOMMediaStreams: MediaStream | |||
MediaStreamGraph: MediaStreamGraph | |||
GMP (OpenH264): GMP | |||
MediaRecorder: MediaRecorder, MediaEncoder, TrackEncoder, VP8TrackEncoder | |||
=== Media (the GIPS stack: RTP/RTCP) === | === Media (the GIPS stack: RTP/RTCP) === | ||
Line 27: | 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. | ||
* NSPR_LOG_MODULES=webrtc_trace:65535 | * NSPR_LOG_MODULES=webrtc_trace:65535 (in Firefox 54 and later, you need to use levels 1-5, with 5 being the most verbose, equivalent to 65535 in the old way) | ||
* 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/MOZ 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>). |