Closed Bug 2084854 Opened 1 month ago Closed 23 days ago

Rename LogModules that cannot be controlled through MOZ_LOG

Categories

(Core :: XPCOM, task)

task

Tracking

()

RESOLVED FIXED
161 Branch
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:

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.

See Also: → 2086657
See Also: → 2086676

This bug now only covers the modules with a fixed name, which a rename fixes:

  • Login crypto and Login storage become LoginCrypto and LoginStorage.
  • LoginHelper(Main) and LoginHelper(Content) become LoginHelper.Main and LoginHelper.Content, as MOZ_LOG doesn't accept parentheses in a name.
  • *** PurgeTrackerService: becomes PurgeTrackerService.
  • ML:OpenAIPipeline and ML:LlamaCppPipeline become GeckoMLOpenAIPipeline and GeckoMLLlamaCppPipeline, following GeckoMLONNXPipeline, rather than the ML.<name> names from comment 0.
  • BackupService::ArchiveEncryption, missing from comment 0, becomes BackupService.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.

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.

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.

MOZ_LOG reads the colon as a separator, so it could not configure these modules. The new names follow the one of GeckoMLONNXPipeline.

MOZ_LOG reads the colons as separators, so it could not configure this module.

Attachment #9670632 - Attachment description: WIP: Bug 2084854 - Rename the "*** PurgeTrackerService:" log module to "PurgeTrackerService". r?timhuang → Bug 2084854 - Rename the "*** PurgeTrackerService:" log module to "PurgeTrackerService". r?timhuang
Attachment #9670633 - Attachment description: WIP: Bug 2084854 - Rename the "Login crypto", "Login storage" and "LoginHelper(<process>)" log modules to "LoginCrypto", "LoginStorage" and "LoginHelper.<process>". r?#credential-management-reviewers → Bug 2084854 - Rename the "Login crypto", "Login storage" and "LoginHelper(<process>)" log modules to "LoginCrypto", "LoginStorage" and "LoginHelper.<process>". r?#credential-management-reviewers
Attachment #9670634 - Attachment description: WIP: Bug 2084854 - Rename the "ML:OpenAIPipeline" and "ML:LlamaCppPipeline" log modules to "GeckoMLOpenAIPipeline" and "GeckoMLLlamaCppPipeline". r?#ai-platform-reviewers → Bug 2084854 - Rename the "ML:OpenAIPipeline" and "ML:LlamaCppPipeline" log modules to "GeckoMLOpenAIPipeline" and "GeckoMLLlamaCppPipeline". r?#ai-platform-reviewers
Attachment #9670635 - Attachment description: WIP: Bug 2084854 - Rename the "BackupService::ArchiveEncryption" log module to "BackupService.ArchiveEncryption". r?mconley → Bug 2084854 - Rename the "BackupService::ArchiveEncryption" log module to "BackupService.ArchiveEncryption". r?mconley
See Also: → 2086992
Pushed by dcarver@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9968c150907c https://hg.mozilla.org/integration/autoland/rev/b537ed0f5009 Rename the "*** PurgeTrackerService:" log module to "PurgeTrackerService". r=timhuang https://github.com/mozilla-firefox/firefox/commit/59732023eb8c https://hg.mozilla.org/integration/autoland/rev/2e871a91d972 Rename the "Login crypto", "Login storage" and "LoginHelper(<process>)" log modules to "LoginCrypto", "LoginStorage" and "LoginHelper.<process>". r=credential-management-reviewers,joschmidt https://github.com/mozilla-firefox/firefox/commit/f0755bc46327 https://hg.mozilla.org/integration/autoland/rev/1aef29839398 Rename the "ML:OpenAIPipeline" and "ML:LlamaCppPipeline" log modules to "GeckoMLOpenAIPipeline" and "GeckoMLLlamaCppPipeline". r=ai-platform-reviewers,valentinp https://github.com/mozilla-firefox/firefox/commit/498f71dc1c8d https://hg.mozilla.org/integration/autoland/rev/86bab1401008 Rename the "BackupService::ArchiveEncryption" log module to "BackupService.ArchiveEncryption". r=mconley
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: