Replace search service logging with console.createInstance
Categories
(Firefox :: Search, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(2 files)
I've just found out that we can replace our current logging with a console wrapper, that allows different log levels.
We could do something like:
this._log = console.createInstance({
prefix: "SearchService",
maxLogLevel: "Warn",
});
This gives us a prefixed log, line number information and fully compatible console.log output so that we can e.g. output objects to the console and have them able to be inspected.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
I've done a first pass here and tried to clean up what's sensible to do so, I think we should be prepared to reduce logging/clean up more in the future if it makes sense, it is probably worth watch as we move forward.
I have used different levels of logging where I feel it is appropriate, adding more warn/errors that we didn't have the capability for before.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D77649
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0a0feb5361c9 Replace SearchUtils.log with console.createInstance. r=daleharvey https://hg.mozilla.org/integration/autoland/rev/dd60c4a35ba7 Replace SearchUtils.fail with direct throws. r=daleharvey
Comment 5•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0a0feb5361c9
https://hg.mozilla.org/mozilla-central/rev/dd60c4a35ba7
Description
•