On Mon, Mar 21, 2016 at 9:13 AM, Honza Bambas <hbam...@mozilla.com> wrote:

> tl;dr: Start migrating to use of MOZ_LOG_* instead of NSPR_LOG_*.  Don't
> worry about backward compatibility tho, when MOZ_LOG_* is not set, we
> fallback to NSPR_LOG_* values.
>

Hi Honza,

Thanks for making the world a better place!  I'm sorry to add to your
burden, but could you drop links to updated MDN documentation?  I know that
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR/Reference/NSPR_LOG_MODULES
probably wants to reference your new work, and there are probably
additional places.  Is this in the coding styles document?  (Yet?)

Thanks again!
Nick


>
>
> The longer version:
>
> Since the new logging code sits in XPCOM and has no longer anything to do
> with NSPR and NSPR logging, we want to modernize it and release it from the
> NSPR chains even more.
>
> Two days ago a patch for bug 1248565 [1] has landed.  That patch
> introduces two new environment variables - MOZ_LOG_MODULES and
> MOZ_LOG_FILE.  The values are expected to be the same as for the NSPR_LOG_*
> variables pair.
>
> If you don't specify MOZ_LOG_* vars but NSPR_LOG_* vars are specified, we
> will fallback to their values (i.e. those are then used for the new XPCOM
> logging as it was before the patch).  This preserves compatibility and
> there is no rush to redo all existing systems to use MOZ_LOG_*.
>
> The NSPR_LOG_* pair can be specified along with the MOZ_LOG_* pair.
> Actually, NSPR_LOG_* is still needed for code that haven't migrated to the
> new logging API, see [1] and [3], and also for modules defined in NSPR and
> NSS code.
>
>
> The rational for this move:
>
> - the new logging has nothing to do with NSPR, it's now in XPCOM
>
> - bug 1248565 [1] -> NSPR logging and XPCOM logging both write to the same
> file
>
>
> -hb-
>
>
> [1]
> https://mxr.mozilla.org/mozilla-central/search?string=PR_NewLogModule(%22
>
> [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1248565
>
> [3] https://bugzilla.mozilla.org/show_bug.cgi?id=1219461
>
>
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to