139
edits
(Replacing MOZ_LOG* with NSPR_LOG*) |
|||
Line 15: | Line 15: | ||
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 | ||
* | * NSPR_LOG_MODULES=signaling:5,mtransport:5 | ||
* | * NSPR_LOG_FILE=/path/to/nspr.log (if you don't want the default stderr) | ||
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. | ||
Line 27: | Line 27: | ||
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 | ||
* 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>). |
edits