Closed Bug 1373213 Opened 8 years ago Closed 8 years ago

Repair cubeb logging

Categories

(Core :: Audio/Video: cubeb, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: padenot, Assigned: padenot)

Details

Attachments

(1 file)

No description provided.
When enabling logging via MOZ_LOG env var, it does not work. It goes like this: - On startup, the env var are read, logging for cubeb is enabled - We specify a pref in all.js, that is, by default, set to "" (empty string) - We have a RegisterCallbackAndCall in CubebUtils::Init, that ended up calling the PrefChanged function, that ended up setting the log module to "disabled". There is a member in LogModuleManager that can tell us whether log modules have been set via an env var, but it's not exposed. Enabling a log module via pref is nice, but mostly useful during execution, not at startup. In addition, because cubeb is an external library, it can't use MOZ_LOG, and so needs to enable/disable logging by hand. Removing the pref from all.js and not calling the PrefChanged function on startup repairs it so we can diagnose stuff. Ideally, we would expose this member from LogModuleManager so we could distinguish from MOZ_LOG and prefs, when it come to log modules activation. We can do that later.
Attachment #8878002 - Flags: review?(rjesup) → review+
Assignee: nobody → padenot
Rank: 15
Priority: -- → P1
Hrm, I suppose that this won't work too well because the pref is still in the user profile. I'll get something better.
Attachment #8878002 - Flags: review+ → review?(rjesup)
Attachment #8878002 - Flags: review?(padenot)
Attachment #8878002 - Flags: review?(padenot)
review ping, this is blocking a bunch of stuff
Flags: needinfo?(rjesup)
Attachment #8878002 - Flags: review?(rjesup) → review+
It was already r+ in mozreview.... no idea why it wasn't here. Published again, fixed it
Flags: needinfo?(rjesup)
Pushed by paul@paul.cx: https://hg.mozilla.org/integration/autoland/rev/8e2eff4d5dd0 Repair cubeb logging when using env var. r=jesup
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: