Output bfcache log messages to DevTools' console
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
People
(Reporter: vkhomyackov, Unassigned)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36
Steps to reproduce:
The code in Document::CanSavePresentation outputs explaining messages in MOZ_LOG in the case when a page cannot be saved to bfcache, e.g. at line https://dxr.mozilla.org/mozilla-central/rev/bd65ac107627408a01cf1faf62e59665ba37cf20/dom/base/Document.cpp#10375
MOZ_LOG(gPageCacheLog, mozilla::LogLevel::Verbose,
("Save of %s blocked due to unload handlers", uri.get()));
Actual results:
Messages are written to the log file when there are corresponding environment variables or command-line arguments. In order to see these messages right now, developers must be aware of their existence and must run Firefox with corresponding settings.
Expected results:
As a frontend developer, I'd like to see the same messages in DevTools' console. This would have following benefits:
- this way of reporting various errors and warnings is already familiar to developers
- more developers will be aware of bfcache
- developing and supporting bfcache-friendly pages will be much easier
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 2•3 years ago
|
||
This may actually be an useful feature beyond only bfcache related logs.
We would need a way to know what log module names are being currently used.
And console codebase should probably try to read the log files as that's sounds hard to be notified about each individual log without threading/re-entrance issues.
Updated•2 years ago
|
Description
•