Bug 208122

Summary: Output bfcache log messages to DevTools' console
Product: WebKit Reporter: Victor <vkhomyackov>
Component: HistoryAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Enhancement CC: hi
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=177027

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).