Bug 208122 - Output bfcache log messages to DevTools' console
Summary: Output bfcache log messages to DevTools' console
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: History (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-24 00:43 PST by Victor
Modified: 2020-02-25 14:09 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor 2020-02-24 00:43:28 PST
The function canCacheFrame in PageCache.cpp outputs explaining messages in PCLOG in the case when a page cannot be saved to bfcache, e.g. at line https://github.com/WebKit/webkit/blob/89c28d471fae35f1788a0f857067896a10af8974/Source/WebCore/history/PageCache.cpp#L124

        PCLOG("   -Frame is HTTPS, and cache control prohibits storing");
        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::httpsNoStoreKey());

Actual results:

Messages are probably written to some log file. It is still unknown where to find this log.

Expected results:

I'd like to know, where to find this log file (point me to the documentation, please). Moreover, 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 Devin Rousso 2020-02-25 14:09:43 PST
I think it would be possible to do something along the lines of what we have in the Settings Tab for controlling additional engine logging for Media, MediaSource, and WebRTC (Bug 177027 r223929).