This environment variable specifies which log modules have logging enabled.
moduleName:level[, moduleName:level]*
moduleName is the name specified in a PR_NewLogModule
call or one of the handy magic names listed below.
level is a numeric value between 0 and 5, with the values having the following meanings:
Specify a moduleName
that is associated with the name
argument in a call to PR_NewLogModule
and a non-zero level
value to enable logging for the named moduleName
.
Special log module names are provided for controlling NSPR's log service at execution time. These controls should be set in the NSPR_LOG_MODULES
environment variable at execution time to affect NSPR's log service for your application.
all
enables all log modules. To enable all log module calls to PR_LOG
, set the variable as follows:
set NSPR_LOG_MODULES=all:5
timestamp
results in a timestamp of the form "2015-01-15 21:24:26.049906 UTC - " prefixing every logged line.append
results in log entries being appended to the existing contents of the file referenced by NSPR_LOG_FILE. If not specified, the existing contents of NSPR_LOG_FILE will be lost as a new file is created with the same filename.sync
enables unbuffered logging. This ensures that all log messages are flushed to the operating system as they are written, but may slow the program down.bufsize:
size sets the log buffer to size.Log everything from the Toolkit::Storage component that happens, prefixing each line with the timestamp when it was logged to the file /tmp/foo.log (which will be replaced each time the executable is run).
set NSPR_LOG_MODULES=timestamp,mozStorage:5 set NSPR_LOG_FILE=/tmp/foo.log
NSPR_LOG_MODULES
in testing/mochitest/runtests.py
before pushing to try. You would be able to download the log file as an artifact from the Log viewer.