Filter console messages!

11,201 views
Skip to first unread message

Varunkumar Nagarajan

unread,
Jan 12, 2013, 8:15:52 AM1/12/13
to google-chrome-...@googlegroups.com
Hi,

In one of my applications, third party libraries are polluting the console with so many log messages. It is getting increasingly difficult for me to look out for my messages in that stream. I am looking for ways to have better control over the console panel. 

Filters
I am looking for a way to filter console messages. Currently, there is an option to search for the messages but not filter. Ability to set inclusion / exclusion filter patterns would be really useful. 

Tags
Console.group is a nice way to group the log messages. But, we can have only one group open and write logs only to the currently opened group. It would be handy if we can provide a TAG (like Android logs) and the messages with same TAGs are grouped together. 

Is there any alternative for this in CDT? Thoughts? 

Thanks,
Varun

Sam Dutton

unread,
Jan 12, 2013, 8:19:54 AM1/12/13
to Varunkumar Nagarajan, Google Chrome Developer Tools

+1

Paul Irish

unread,
Jan 12, 2013, 8:05:01 PM1/12/13
to Sam Dutton, Varunkumar Nagarajan, Google Chrome Developer Tools
You can already filter console.log/warn/error independently.  I attached an animated gif to explain. (You can even hold cmd to select multiple).

Meanwhile, I have heard discussions around adding a "Filter" checkbox to the console's search, much like on other tabs.

Inline image 1
image.gif

Varunkumar Nagarajan

unread,
Jan 12, 2013, 11:52:07 PM1/12/13
to Paul Irish, Sam Dutton, Google Chrome Developer Tools
I am aware of the filters on log level but that wouldn't be very helpful in my case. Almost all the libraries use console.log() only. 

Filters (like in other tabs) would be a good start but the ability to filter based inclusion / exclusion patterns would be really useful given that console panel is becoming more verbose when compared to other panels. 

Varun
image.gif

br...@imanen.com

unread,
Feb 27, 2013, 1:43:44 PM2/27/13
to google-chrome-...@googlegroups.com
+1 on the tag idea.

maxka...@gmail.com

unread,
Mar 31, 2013, 1:30:20 PM3/31/13
to google-chrome-...@googlegroups.com

grigo...@gmail.com

unread,
May 5, 2013, 3:06:20 AM5/5/13
to google-chrome-...@googlegroups.com
+1 on filters. 412 for ajax requests is success, but it effectively kills console spamming dozens of messages per second :(.

Kurt Flint

unread,
Jun 25, 2013, 2:29:27 AM6/25/13
to google-chrome-...@googlegroups.com, grigo...@gmail.com
Huge +1 on filters. I'm sick to death of hunting through the log output from crappy plugins looking for my own messages.


Vsevolod Vlasov

unread,
Jun 25, 2013, 9:20:40 AM6/25/13
to Kurt Flint, Google Chrome Developer Tools, grigo...@gmail.com, Dmitry Zvorygin
It is also possible to filter messages from certain URL using console context menu->filter currently.




On Tue, Jun 25, 2013 at 10:29 AM, Kurt Flint <ku...@monkeykeyboard.com> wrote:
Huge +1 on filters. I'm sick to death of hunting through the log output from crappy plugins looking for my own messages.



--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Kurt Flint

unread,
Jun 26, 2013, 1:04:16 PM6/26/13
to Vsevolod Vlasov, Google Chrome Developer Tools, grigo...@gmail.com, Dmitry Zvorygin
I do, and I also have had some success over-riding console.log. 

But my best success to date has just been to throw warnings. And I really am amazed how many problems people are happy to ship their plugins with. No pride in a lot of these people.


   -- Now featuring more MONKEY POWER
                @monkeyKeyboard.com

Kurt Flint


Paul Irish

unread,
Jun 26, 2013, 5:33:59 PM6/26/13
to Kurt Flint, Vsevolod Vlasov, Google Chrome Developer Tools, grigo...@gmail.com, Dmitry Zvorygin
Alright, let me give a summary of what's now available 

Filtering by file:

Inline image 1


Filtering by message category:
Inline image 2


Filtering by message severity:
Inline image 3
(cmd-click for multiple)



and this just landed yesterday..

Filtering console messages by string/regex
Inline image 4

https://code.google.com/p/chromium/issues/detail?id=174795
Just landed yesterday so you'll start seeing it in Canary soon. :)


I think this last one solves most of the use cases brought up here. 


Some of these are available in stable but Canary has the latest, of course.

image.png
image.png
image.png
image.png

Kurt Flint

unread,
Jun 26, 2013, 6:00:20 PM6/26/13
to Paul Irish, Vsevolod Vlasov, Google Chrome Developer Tools, grigory.v.p, Dmitry Zvorygin
The sstring/regex does exclusion? Awesome! 

How many months before this hits stable, which I am working with? It would be cool if there was a channel with a "developer stable" - something almost identical to what your users are using, except with at least the Canary debugging toys added on. And nothing else! One thing I like about Firebug is that as a plugin with extensions you can pick your platform, and pick your poison when it comes to chasing down a reported issue or developing in a particular environment.

Cheers!

By the way, can you describe where exactly your mouse pointer was for the first three clicks? I'm probably guessing correctly, but I'm in "away with a tablet" mode today. Your screen capture doesn't capture your pointer.

Kurt​
image.png
image.png
image.png
image.png

Dmitry Zvorygin

unread,
Jun 26, 2013, 6:08:11 PM6/26/13
to Kurt Flint, Paul Irish, Vsevolod Vlasov, Google Chrome Developer Tools, grigory.v.p
Paul is running ahead a little with his hand-made "screenshot" of console filtering :-)

Current version doesn't support regex, and shows only log messages containing passed string. So it might be useful, for example, to see all messages containing your library specific tag for example.

Is regex is really needed for filtration? If yes - it's surely not very hard to add it.

WBR,
Dmitry.

Paul Irish

unread,
Jun 26, 2013, 6:42:24 PM6/26/13
to Dmitry Zvorygin, Kurt Flint, Vsevolod Vlasov, Google Chrome Developer Tools, grigory.v.p
Thanks for the catch Dmitry.. (yes my last mock was photoshopped. :)

I don't think regex is particularly needed for console filtering. I can see better usecases for excluding search matches.

John J Barton

unread,
Jun 26, 2013, 8:28:28 PM6/26/13
to Paul Irish, Dmitry Zvorygin, Kurt Flint, Vsevolod Vlasov, Google Chrome Developer Tools, grigory.v.p
As in Paul's screenshots, I noticed in using recent builds that the Filter By Message Category seems remove CSS by default. I was surprised by this. It may be a great choice for many users who know about the Filter, but those who don't notice it (most?) will simply think the devtools are failing to list CSS warnings all of sudden. 

Unless that is also a photoshop ;-)
jjb

Paul Irish

unread,
Jun 26, 2013, 9:06:37 PM6/26/13
to John J Barton, Dmitry Zvorygin, Kurt Flint, Vsevolod Vlasov, Google Chrome Developer Tools, grigory.v.p
I believe it was disabled by default because on nearly all production sites it floods the console with warnings about IE hacks that are present in the CSS.

But Alexander has addressed many of those and now the flooding may be quiet enough. It's a tough call on if it should be default and will require some more testing to see what syntactically illegal things are somewhat legit.

Dmitry Zvorygin

unread,
Jun 27, 2013, 3:10:02 AM6/27/13
to John J Barton, Paul Irish, Kurt Flint, Vsevolod Vlasov, Google Chrome Developer Tools, grigory.v.p
Yes, Paul was right, CSS is intentionally hidden by default.

When CSS warnings was landed first time, before "Filter By Category" patch, there were complains about flooding console, so that CSS warnings were temporarily disabled until "Filter patch" was landed.

I'm currently working on patch showing aggregated info on top of console like "100 messages are filtered out and not shown" and button to quickly reset all the filters - that will help users new to filters.


Paul Irish

unread,
Jun 27, 2013, 2:41:10 PM6/27/13
to Dmitry Zvorygin, John J Barton, Kurt Flint, Vsevolod Vlasov, Google Chrome Developer Tools, grigory.v.p
Nice! :)

And here are the real screenshots of the new console filters:
Inline image 1
Inline image 2

image.png
image.png

cast...@gmail.com

unread,
Jul 4, 2013, 5:36:29 AM7/4/13
to google-chrome-...@googlegroups.com
+1 of "Filtering by file" idea. I think this will resolve issues with extensions, that log something into console. But I want to log all messages from particular file, not only console.log/warn/error etc. For ex. I like to have informations about XHR, but drives me crazy when extension ( https://chrome.google.com/webstore/detail/instant-translate/ihmgiclibbndffejedjimfjmfoabpcke ) print me something like this 






With optimism,
Krzysztof

Dmitry Zvorygin

unread,
Jul 4, 2013, 6:11:48 AM7/4/13
to cast...@gmail.com, Google Chrome Developer Tools
Hi, Krzysztof

Have you read all the thread?

Currently you already have ability to filter out all "spamming" message source, by rught-clicking on them, as Vsevolod proposed.

WBR,
Dmitry.


--

cast...@gmail.com

unread,
Jul 4, 2013, 6:37:01 AM7/4/13
to google-chrome-...@googlegroups.com
Hi Dmitry,

I have Canary 30.0.1553.3 and didn't find place, where I can filter certain URL or file. I've clicked RMB on URL or file name, but no luck. Where should I click to filter it? Note that these are XHR logs from installed extension.

Thanks,
Krzysztof

W dniu sobota, 12 stycznia 2013 14:15:52 UTC+1 użytkownik Varunkumar Nagarajan napisał:

Vsevolod Vlasov

unread,
Jul 4, 2013, 9:11:25 AM7/4/13
to cast...@gmail.com, Google Chrome Developer Tools
You should right click on the message itself, not on the link.
It doesn't work for XHR logs though indeed, can you file a bug on crbug.com and send a link here?

Thank you,



--

cast...@gmail.com

unread,
Jul 4, 2013, 9:24:59 AM7/4/13
to google-chrome-...@googlegroups.com
Bug solved, Dmitry Zvorygin helped me.
Simply, I use mac and context menu is not working on mac ;) There is a bug to fix already attached to Dmitry.

Thanks,
Krzysztof

W dniu sobota, 12 stycznia 2013 14:15:52 UTC+1 użytkownik Varunkumar Nagarajan napisał:
Reply all
Reply to author
Forward
0 new messages