NSPR_LOG_MODULES has become case-sensitive (due to LazyLog)

NEW
Unassigned

Status

()

Core
XPCOM
2 years ago
2 years ago

People

(Reporter: jesup, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox48 affected)

Details

(Reporter)

Description

2 years ago
We've been telling people for a Long Time to do things like "get logs with NSPR_LOG_MODULES=mediamanager:4", etc.  This always worked.  After LazyLog changes landed, suddenly people get no logs because it's now case-sensitive, and we always had "MediaManager" (etc - this is not the only log affected) in the LogModule definitions.

Converting the LazyLog uses to lowercase would just add to the churn and confusion (since we've had to start telling people "MediaManager:4" etc).  Far better would be to restore the case-insensitivity which has been the case since time immemorial.  It should be trivial - use a case-insensitive compare.
It's not an unreasonable request. I personally prefer case sensitivity, but I can see in a historical context that this would be confusing. The important thing to note is that part of the purpose of implementing our own logging is that we don't have to be burdened by the historical quirks of NSPR logging.

If we want to revert back to the old behavior I think we'd need to audit the codebase to make sure there aren't any unintentional collisions.
Looking at a clean checkout there are 210 unique log names, if I ignore case there are still 210 unique log names so I think we're okay to switch back to the old behavior.
You need to log in before you can comment on or make changes to this bug.