This environment variable specifies which log modules have logging enabled.

Syntax

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:

Description

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. 

Examples

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

Logging with Try Server