ccampbell/chromelogger

Console messages don't display, even though X-ChromeLogger-Data header exists

Opened this issue · 9 comments

I'm trying to use chromelogger in an SPA. I make ajax calls, and on the server side I use chromelogger on that request. When the request completes I can see a lot of data in the X-ChromeLogger-Data header, but I don't get data in my console. occasionally the data shows up, but most of the time it doesn't.

Any ideas? The chromelogger icon in chrome is enabled. I'm on chrome 42.0.2311.13. Just installed the chromelogger extension yesterday so I'm on the latest version.

Thanks.

Have you clicked the icon to make sure it is toggled on?

Yes as I said the chromelogger icon is enabled. I've togged it off and back on to see if that made a difference and it didn't.

Ah sorry about that... hmmm... Can you try it on a regular request that is not ajax?

If you go to https://craig.is/writing/chrome-logger and open the console and toggle on the extension do you see the logs?

Interesting... I am actually not seeing them show up every time too. I wonder if this is something specific to a new version of chrome. I will have to dig into it more later.

Thanks. I noticed the irregularity when testing on a single page also.

filso commented

Hi, I believe there's some race condition there. maybe _listenForLogMessages runs too late, after response is back?

Doesn't work reliably I'm afraid. Probably because Chrome does goofy stuff to the headers/caches them? Its though to use in production.

Is there a page where this is consistently reproducible or some other way I can test it?

Well - just figured out the issue. In case anyone else has this issue - my issue was as simple as not selecting the Info type errors in the console. For anyone else experiencing this issue in getting messages in Chrome developer console make sure the error types you want to see are selected.
phpconsole