WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
151280
Web Inspector: Dashboard log message count doesn't include console.time messages
https://bugs.webkit.org/show_bug.cgi?id=151280
Summary
Web Inspector: Dashboard log message count doesn't include console.time messages
Matt Baker
Reported
2015-11-13 16:12:11 PST
* SUMMARY Dashboard log message count doesn't include console.time messages. The Console log filter shows console.time messages when "Logs" is selected, so they should be included in the total. * STEPS TO REPRODUCE 1. Inspector -> Console tab 2. Type "console.log(1)" 3. Dashboard log count is 1. 4. Type "console.time('foo')" 5. Type "console.timeEnd('foo')" => Log count is 1. Expected 2. Filtering the Console log by "Errors" hides the time marker. Filtering by "Logs" shows the time marker.
Attachments
Patch
(1.66 KB, patch)
2016-01-10 03:42 PST
,
Johan K. Jensen
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-11-13 16:12:49 PST
<
rdar://problem/23543063
>
Johan K. Jensen
Comment 2
2016-01-09 13:00:11 PST
The problem is in `_incrementConsoleMessageType` in `Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js`, where it only increments log/issue/error-count if the ConsoleMessage has the levels log, warning, or error respectively. As there also exists MessageLevels info and debug, those are not included in the log-count. Adding two fallthrough cases for info and debug to also increment the log-count would solve the problem. This would make `console.timeEnd()`, `console.debug()`, and `console.info()` increment the log-count in the dashboard. If that sounds like an okay solution, I’d like to submit a patch.
Matt Baker
Comment 3
2016-01-09 23:01:58 PST
(In reply to
comment #2
)
> The problem is in `_incrementConsoleMessageType` in > `Source/WebInspectorUI/UserInterface/Models/DefaultDashboard.js`, where it > only increments log/issue/error-count if the ConsoleMessage has the levels > log, warning, or error respectively. > As there also exists MessageLevels info and debug, those are not included in > the log-count.
The Chrome console API reference states that console.info and console.debug are identical to console.log, so it works for me!
> Adding two fallthrough cases for info and debug to also increment the > log-count would solve the problem. > This would make `console.timeEnd()`, `console.debug()`, and `console.info()` > increment the log-count in the dashboard. > > If that sounds like an okay solution, I’d like to submit a patch.
Sounds good.
Johan K. Jensen
Comment 4
2016-01-10 03:42:55 PST
Created
attachment 268643
[details]
Patch
Blaze Burg
Comment 5
2016-01-10 11:36:56 PST
Comment on
attachment 268643
[details]
Patch r=me
WebKit Commit Bot
Comment 6
2016-01-10 12:24:43 PST
Comment on
attachment 268643
[details]
Patch Clearing flags on attachment: 268643 Committed
r194828
: <
http://trac.webkit.org/changeset/194828
>
WebKit Commit Bot
Comment 7
2016-01-10 12:24:48 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug