For a long time now we have had the desire to improve our logging story <https://bugzilla.mozilla.org/show_bug.cgi?id=881389>, especially from JavaScript.

Currently we have three different methods of module-style logging in JavaScript code: Log.sys.mjs <https://searchfox.org/mozilla-central/source/toolkit/modules/Log.sys.mjs>, Console.sys.mjs <https://searchfox.org/mozilla-central/source/toolkit/modules/Console.sys.mjs> and console.createInstance <https://firefox-source-docs.mozilla.org/toolkit/javascript-logging.html#logging-using-the-console-web-api>. We need to consolidate these to remove the complexity and make it easier for the next steps.

Today we are taking the first steps - I am landing a patch <https://bugzilla.mozilla.org/show_bug.cgi?id=1872674> that will raise ESLint errors on new instances of Log.sys.mjs and Console.sys.mjs being used. This is intended to stop us adding new instances where we don't need to.

The first part of the current plan is to resolve differences between Console.sys.mjs and console.createInstance and then remove Console.sys.mjs <https://bugzilla.mozilla.org/show_bug.cgi?id=1430810>.

Log.sys.mjs replacement <https://bugzilla.mozilla.org/show_bug.cgi?id=1828156> will need more investigation as it has some additional functionality that may not be available in the current console.createInstance.

Mark.

--
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/023313f2-8e72-429b-9350-93f7d16a6480%40mozilla.com.

Reply via email to