Hi Folks-

With bug 1233881 <https://bugzilla.mozilla.org/show_bug.cgi?id=1233881> we
landed the ability turn on logging via prefs.

Lets say you have a log module "Foo", if you add a "logging.Foo" pref and
set it to "Debug" you will now see all output from the Foo log module that
is of Debug and higher importance.

Why is this so cool? Well now you don't need to restart your browser to
enable logging [1]. You also don't have to set env vars to enable logging
[2].

There is one caveat: if you don't use LazyLogModule and friends, you don't
get dynamic logging. So go update your loggers!

-e

[1] Okay, this only kind of works right now. You'll still need to set
NSPR_LOG_MODULES="anything_you_want" to see output. Bug 1174972
<https://bugzilla.mozilla.org/show_bug.cgi?id=1174972> will fix this.

[2] If you care about messages during startup you will still need to set
the NSPR_LOG_MODULES env var. Unfortunately it takes time to load the pref
system, and then more time to load your profile.
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to