Open Bug 1876514 Opened 2 years ago Updated 2 years ago

Allow ConsoleInstances to treat their associated preference value as case-insensitive

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

People

(Reporter: standard8, Unassigned)

References

(Blocks 2 open bugs)

Details

Due to our several different types of logging system, we have multiple types of case when specifying logging levels.

  • Console.sys.mjs uses all lower case. The preference values are treated as case-insensitive.
  • Log.sys.mjs and console.createInstance use PascalCase, and require the preference in PascalCase as well.

We think the best option is to keep the logging levels as case-sensitive in the code, but to allow the preference values to be case-insensitive.

This would allow the logging level strings to continue to be specified in Console.webidl, which will allow us to use automated checks to ensure the correct levels are specified.

It would also allow more flexibility when people set preferences - for example, if a developer (or a user at a request of a developer) entered all lower-case, then it wouldn't matter.

Hence the change here would be to treat the preferences as case-insensitive.

Blocks: 1876516
Depends on: 1876589
You need to log in before you can comment on or make changes to this bug.