Rename LogModules that cannot be controlled through MOZ_LOG
Categories
(Core :: XPCOM, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: dcarver, Assigned: dcarver)
References
(Blocks 1 open bug)
Details
Attachments
(4 external files)
Loggers created with console.createInstance use their prefix as a log module name. Some of these names contain characters that MOZ_LOG uses as separators (,, :, space) or doesn't accept in a name. MOZ_LOG can't configure these modules, so they can only be enabled through their logging.<name> pref. For example, MOZ_LOG=Login crypto:5 sets Login to Error and crypto to Verbose.
The modules:
Login crypto(crypto-SDR.sys.mjs) andLogin storage(storage-geckoview.sys.mjs). The other password manager loggers already use names such asLoginRecipes.*** PurgeTrackerService:(PurgeTrackerService.sys.mjs)ML:OpenAIPipeline(OpenAIPipeline.mjs) andML:LlamaCppPipeline(LlamaCppPipeline.mjs)URLBar - <name>(UrlbarShared.mjs) andPlaces - <name>(PlacesUtils.sys.mjs)SQLite JSM (<name>)(Sqlite.sys.mjs)
Names made of letters, digits, _, - and . that don't start with a digit work with MOZ_LOG, e.g. LoginCrypto, PurgeTrackerService, ML.OpenAIPipeline or URLBar.<name>. The browser.urlbar.loglevel, places.loglevel and toolkit.sqlitejsm.loglevel prefs are not affected by the rename, but anyone setting logging.<name> for an old name has to switch to the new one.
SQLite JSM is the odd one out: besides the fixed names SQLite JSM (ConnectionOpener), (ConnectionCloner) and (ConnectionWrapper), it creates one logger per connection, named from the database file name and a counter, e.g. SQLite JSM (Connection places.sqlite#0). These carry runtime data, so there is no single name to rename them to (bug 2084142 comment 2). They need either a name that MOZ_LOG can spell (e.g. SQLiteJSM.places.sqlite.0) or a single module per kind with the connection name in the messages.
Bug 2079145 first planned this rename before LogModule::Get rejects invalid names, and was closed in favor of matching names by a normalized key (bug 2084142). Bug 2084142 comment 3 asks whether renaming the remaining modules is preferable instead. 3pcbexception was already renamed in bug 2084279.
| Assignee | ||
Comment 1•1 month ago
|
||
This bug now only covers the modules with a fixed name, which a rename fixes:
Login cryptoandLogin storagebecomeLoginCryptoandLoginStorage.LoginHelper(Main)andLoginHelper(Content)becomeLoginHelper.MainandLoginHelper.Content, as MOZ_LOG doesn't accept parentheses in a name.*** PurgeTrackerService:becomesPurgeTrackerService.ML:OpenAIPipelineandML:LlamaCppPipelinebecomeGeckoMLOpenAIPipelineandGeckoMLLlamaCppPipeline, followingGeckoMLONNXPipeline, rather than theML.<name>names from comment 0.BackupService::ArchiveEncryption, missing from comment 0, becomesBackupService.ArchiveEncryption.
The modules named at run time (URLBar - <name>, Places - <name> and SQLite JSM (<name>)) move to bug 2086676. It logs each of them to a single module (URLBar, Places and Sqlite), with the run-time part in the messages. Bug 2086657 adds a logModule option to console.createInstance, so that a console's module name no longer has to double as its label.
| Assignee | ||
Comment 2•1 month ago
|
||
MOZ_LOG reads the colon as a separator and does not accept "*" or spaces in a module name, so it could not configure this module.
| Assignee | ||
Comment 3•1 month ago
|
||
MOZ_LOG could not configure these modules:
- "Login crypto" and "Login storage" become "LoginCrypto" and "LoginStorage": MOZ_LOG reads the space as a separator.
- "LoginHelper(Main)" and "LoginHelper(Content)" become "LoginHelper.Main" and "LoginHelper.Content": MOZ_LOG does not accept parentheses in a module name.
| Assignee | ||
Comment 4•1 month ago
|
||
MOZ_LOG reads the colon as a separator, so it could not configure these modules. The new names follow the one of GeckoMLONNXPipeline.
| Assignee | ||
Comment 5•1 month ago
|
||
MOZ_LOG reads the colons as separators, so it could not configure this module.
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Updated•1 month ago
|
Comment 7•23 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b537ed0f5009
https://hg.mozilla.org/mozilla-central/rev/2e871a91d972
https://hg.mozilla.org/mozilla-central/rev/1aef29839398
https://hg.mozilla.org/mozilla-central/rev/86bab1401008
Description
•