Bug 194719 - Add MSE logging configuration
Summary: Add MSE logging configuration
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-15 13:19 PST by Eric Carlson
Modified: 2019-02-18 10:38 PST (History)
16 users (show)

See Also:


Attachments
Patch (12.74 KB, patch)
2019-02-15 13:58 PST, Eric Carlson
joepeck: review+
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-highsierra (2.43 MB, application/zip)
2019-02-15 15:11 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews104 for mac-highsierra-wk2 (3.09 MB, application/zip)
2019-02-15 15:14 PST, EWS Watchlist
no flags Details
Patch for landing (13.98 KB, patch)
2019-02-15 15:50 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Updated pPatch for landing. (17.61 KB, patch)
2019-02-18 08:29 PST, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2019-02-15 13:19:40 PST
Add UI to configure the MSE runtime logging added in r241148.
Comment 1 Radar WebKit Bug Importer 2019-02-15 13:30:52 PST
<rdar://problem/48122151>
Comment 2 Eric Carlson 2019-02-15 13:58:55 PST
Created attachment 362154 [details]
Patch
Comment 3 EWS Watchlist 2019-02-15 14:01:43 PST
This patch modifies the inspector protocol generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-inspector-generator-tests --reset-results`)

This patch modifies the inspector protocol. Please ensure that any frontend changes appropriately use feature checks for new protocol features.
Comment 4 Joseph Pecoraro 2019-02-15 14:51:55 PST
Comment on attachment 362154 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=362154&action=review

r=me

> Source/WebInspectorUI/UserInterface/Views/LogContentView.js:93
>                  new WI.ScopeBarItem(WI.LogContentView.Scopes.Media, WI.UIString("Media"), {className: "media"}),
> +                new WI.ScopeBarItem(WI.LogContentView.Scopes.Media, WI.UIString("MediaSource"), {className: "mediasource"}),

So we are re-using the "Media" Scope? I think that is fine.
Comment 5 EWS Watchlist 2019-02-15 15:11:12 PST
Comment on attachment 362154 [details]
Patch

Attachment 362154 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/11164365

New failing tests:
inspector/console/webcore-logging.html
Comment 6 EWS Watchlist 2019-02-15 15:11:14 PST
Created attachment 362163 [details]
Archive of layout-test-results from ews101 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 7 EWS Watchlist 2019-02-15 15:14:02 PST
Comment on attachment 362154 [details]
Patch

Attachment 362154 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/11164329

New failing tests:
inspector/console/webcore-logging.html
Comment 8 EWS Watchlist 2019-02-15 15:14:04 PST
Created attachment 362164 [details]
Archive of layout-test-results from ews104 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 9 Eric Carlson 2019-02-15 15:50:46 PST
Created attachment 362173 [details]
Patch for landing
Comment 10 Devin Rousso 2019-02-15 16:34:37 PST
Comment on attachment 362173 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=362173&action=review

> Source/WebInspectorUI/UserInterface/Views/LogContentView.js:93
> +                new WI.ScopeBarItem(WI.LogContentView.Scopes.Media, WI.UIString("MediaSource"), {className: "mediasource"}),

Doesn't this mean that if someone wants to search by MediaSource messages, they'd only get Media messages?  Why aren't we using a `WI.LogConentView.Scopes.MediaSource`?
Comment 11 Eric Carlson 2019-02-15 17:17:14 PST
(In reply to Devin Rousso from comment #10)
> Comment on attachment 362173 [details]
> Patch for landing
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=362173&action=review
> 
> > Source/WebInspectorUI/UserInterface/Views/LogContentView.js:93
> > +                new WI.ScopeBarItem(WI.LogContentView.Scopes.Media, WI.UIString("MediaSource"), {className: "mediasource"}),
> 
> Doesn't this mean that if someone wants to search by MediaSource messages,
> they'd only get Media messages?  Why aren't we using a
> `WI.LogConentView.Scopes.MediaSource`?

Adding a new scope will add another button to the already crowded console, and I don't think people will typically want MSE without Media. 

We should revisit the logging and console UI soon, we can consider adding something specifically for MSE then.
Comment 12 Devin Rousso 2019-02-15 17:44:16 PST
Comment on attachment 362173 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=362173&action=review

>>> Source/WebInspectorUI/UserInterface/Views/LogContentView.js:93
>>> +                new WI.ScopeBarItem(WI.LogContentView.Scopes.Media, WI.UIString("MediaSource"), {className: "mediasource"}),
>> 
>> Doesn't this mean that if someone wants to search by MediaSource messages, they'd only get Media messages?  Why aren't we using a `WI.LogConentView.Scopes.MediaSource`?
> 
> Adding a new scope will add another button to the already crowded console, and I don't think people will typically want MSE without Media. 
> 
> We should revisit the logging and console UI soon, we can consider adding something specifically for MSE then.

This code is adding another scope bar item though.  I'm questioning whether the id for the item should be `WI.LogContentView.Scopes.MediaSource`, as otherwise the filtering won't work.  I think we should be adding a `WI.LogContentView.Scopes.MediaSource` type so that someone can filter MediaSource messages.  As you have it now, the Media and MediaSource buttons will have the _same_ effect, which I don't think is what you want (if it is, then please add a comment as to why).

    new WI.ScopeBarItem(WI.LogContentView.Scopes.MediaSource, WI.UIString("MediaSource"), {className: "mediasource"}),

Media-related console messages are filtered by the source of the message.  MediaSource messages will have the source of `WI.ConsoleMessage.MessageSource.MediaSource`, which is exactly what you'd want to filter on (you'd need to add a case for it inside `_scopeFromMessageSource`).
Comment 13 Eric Carlson 2019-02-18 08:26:29 PST
Comment on attachment 362173 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=362173&action=review

>>>> Source/WebInspectorUI/UserInterface/Views/LogContentView.js:93
>>>> +                new WI.ScopeBarItem(WI.LogContentView.Scopes.Media, WI.UIString("MediaSource"), {className: "mediasource"}),
>>> 
>>> Doesn't this mean that if someone wants to search by MediaSource messages, they'd only get Media messages?  Why aren't we using a `WI.LogConentView.Scopes.MediaSource`?
>> 
>> Adding a new scope will add another button to the already crowded console, and I don't think people will typically want MSE without Media. 
>> 
>> We should revisit the logging and console UI soon, we can consider adding something specifically for MSE then.
> 
> This code is adding another scope bar item though.  I'm questioning whether the id for the item should be `WI.LogContentView.Scopes.MediaSource`, as otherwise the filtering won't work.  I think we should be adding a `WI.LogContentView.Scopes.MediaSource` type so that someone can filter MediaSource messages.  As you have it now, the Media and MediaSource buttons will have the _same_ effect, which I don't think is what you want (if it is, then please add a comment as to why).
> 
>     new WI.ScopeBarItem(WI.LogContentView.Scopes.MediaSource, WI.UIString("MediaSource"), {className: "mediasource"}),
> 
> Media-related console messages are filtered by the source of the message.  MediaSource messages will have the source of `WI.ConsoleMessage.MessageSource.MediaSource`, which is exactly what you'd want to filter on (you'd need to add a case for it inside `_scopeFromMessageSource`).

Fair enough.
Comment 14 Eric Carlson 2019-02-18 08:29:33 PST
Created attachment 362299 [details]
Updated pPatch for landing.
Comment 15 WebKit Commit Bot 2019-02-18 10:38:09 PST
Comment on attachment 362299 [details]
Updated pPatch for landing.

Clearing flags on attachment: 362299

Committed r241729: <https://trac.webkit.org/changeset/241729>
Comment 16 WebKit Commit Bot 2019-02-18 10:38:11 PST
All reviewed patches have been landed.  Closing bug.