* 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.
<rdar://problem/23543063>
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.
(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.
Created attachment 268643 [details] Patch
Comment on attachment 268643 [details] Patch r=me
Comment on attachment 268643 [details] Patch Clearing flags on attachment: 268643 Committed r194828: <http://trac.webkit.org/changeset/194828>
All reviewed patches have been landed. Closing bug.