in some cases it may be necessary to log the http traffic of your browser. For example
- Web developing
- Or for forensic purposes when you want in detail logged which site you are visiting or from which site you are moved to other sites…
Mozilla Firefox has the ability to do that. This behaviour is controled by 2 environtment varibales
NSPR_LOG_MODULES – determines what is logged and in which detail
NSPR_LOG_FILE – Defines the log file
I use these set of modules in debug level 3, but there are many more logging modules you can use.
which is a good compromise between detail depth and logfile size.
How to set these variables?
Under Windows, add it to your profile. Open Control Panel, System, Advancend System Settings, Environment Variables.
Under linux append the variables to the .profile file in your home directory:
michael@debdev:~# echo export NSPR_LOG_MODULES=nsHttp:3,nsHostResolver:3 >> ~/.profile michael@debdev:~# echo export NSPR_LOG_FILE=~/firefox.log >> ~/.profile
Logoff and logon again and check if they are set
michael@debdev:~# set |grep NSPR NSPR_LOG_FILE=/home/michael/firefox.log NSPR_LOG_MODULES=nsHttp:3,nsHostResolver:3
Start Firefox and look if the were logfile created and whether the log level is sufficient for your requirements.