Bug 1275439 - Switch debugging to MOZ_LOG. r=erahm

This is shorter than MOZ_LOG_MODULES and equally clear.

Add a deprecation warning to encourge folks to migrate,
and update references in the test runner.

MozReview-Commit-ID: HYY3Q9tSu13

--HG--
extra : rebase_source : 83dfe510a34fa82681d6bf7b628bcca075122544
This commit is contained in:
Ralph Giles 2016-05-16 15:49:20 -07:00
Родитель 9ca4638c24
Коммит c8210f43ce
2 изменённых файлов: 20 добавлений и 7 удалений

Просмотреть файл

@ -83,11 +83,13 @@ here = os.path.abspath(os.path.dirname(__file__))
# Option for MOZ (former NSPR) logging #
########################################
# Set the desired log modules you want a log be produced by a try run for, or leave blank to disable the feature.
# This will be passed to MOZ_LOG_MODULES environment variable. Try run will then put a download link for all log files
# Set the desired log modules you want a log be produced
# by a try run for, or leave blank to disable the feature.
# This will be passed to MOZ_LOG environment variable.
# Try run will then put a download link for all log files
# on tbpl.mozilla.org.
MOZ_LOG_MODULES = ""
MOZ_LOG = ""
#####################
# Test log handling #
@ -1234,11 +1236,11 @@ toolbar#nav-bar {
if options.fatalAssertions:
browserEnv["XPCOM_DEBUG_BREAK"] = "stack-and-abort"
# Produce a mozlog, if setup (see MOZ_LOG_MODULES global at the top of
# Produce a mozlog, if setup (see MOZ_LOG global at the top of
# this script).
self.mozLogs = MOZ_LOG_MODULES and "MOZ_UPLOAD_DIR" in os.environ
self.mozLogs = MOZ_LOG and "MOZ_UPLOAD_DIR" in os.environ
if self.mozLogs:
browserEnv["MOZ_LOG_MODULES"] = MOZ_LOG_MODULES
browserEnv["MOZ_LOG"] = MOZ_LOG
if debugger and not options.slowscript:
browserEnv["JS_DISABLE_SLOW_SCRIPT_SIGNALS"] = "1"

Просмотреть файл

@ -122,9 +122,20 @@ public:
bool shouldAppend = false;
bool addTimestamp = false;
bool isSync = false;
const char* modules = PR_GetEnv("MOZ_LOG_MODULES");
const char* modules = PR_GetEnv("MOZ_LOG");
if (!modules || !modules[0]) {
modules = PR_GetEnv("MOZ_LOG_MODULES");
if (modules) {
NS_WARNING("MOZ_LOG_MODULES is deprecated."
"\nPlease use MOZ_LOG instead.");
}
}
if (!modules || !modules[0]) {
modules = PR_GetEnv("NSPR_LOG_MODULES");
if (modules) {
NS_WARNING("NSPR_LOG_MODULES is deprecated."
"\nPlease use MOZ_LOG instead.");
}
}
NSPRLogModulesParser(modules,