Last active
December 14, 2015 07:59
-
-
Save kumar303/5054419 to your computer and use it in GitHub Desktop.
Turn on http logging for B2G
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This is a script you can run to turn on HTTP | |
# logging for a B2G device. | |
# It's not fully automatic. It will start B2G on the | |
# the device with logging enabled but when you quit (^C) | |
# you have to pull the log down from the device like this: | |
# | |
# adb pull /data/local/tmp/http.log | |
# | |
# More info: | |
# https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging | |
# | |
adb shell stop b2g | |
echo "restarting with HTTP logging enabled" | |
echo "press control+C to quit" | |
# Clear out any old logs. | |
adb shell rm /data/local/tmp/http.log | |
# Reboot with just http request/response logging. | |
adb shell <<SHELL | |
#export NSPR_LOG_MODULES=timestamp,nsHttp:5,nsSocketTransport:5,nsHostResolver:5 | |
export NSPR_LOG_MODULES=nsHttp:3 | |
export NSPR_LOG_FILE=/data/local/tmp/http.log | |
/system/bin/b2g.sh | |
SHELL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment