Closed
Bug 1862989
Opened 2 years ago
Closed 2 years ago
Expose a .logLevelAtLeast(somelevel) API in ConsoleInstance
Categories
(DevTools :: Console, task)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1874957
People
(Reporter: mak, Unassigned)
References
(Blocks 1 open bug)
Details
Using console.createInstance.
When logging something requires expensive operations, it would be nice to be able to skip the work if it won't be logged.
For example, instead of:
let serializedComplexObject = expensiveOp();
logConsole.trace(serializedComplexObject);
one could do:
if (logConsole.logLevelAtLeast("Trace")) {
let serializedComplexObject = expensiveOp();
logConsole.trace(serializedComplexObject);
}
| Reporter | ||
Updated•2 years ago
|
Component: General → Console
Product: Core → DevTools
| Reporter | ||
Updated•2 years ago
|
Summary: Expose a .logLevelAtLeast(somelevel) API → Expose a .logLevelAtLeast(somelevel) API in ConsoleInstance
Updated•2 years ago
|
Type: enhancement → task
Comment 1•2 years ago
|
||
I'm addressing this in bug 1874957.
You need to log in
before you can comment on or make changes to this bug.
Description
•