News for hackers. Stuff that matters.
Re:Server side logging to Chrome console from PHP and Python by bsimpson on Tuesday April 09, 2013 @02:54PM (#5520281)
Another excellent option, if you'd rather not have to use Chrome dev tools:

https://github.com/mgood/flask-debugtoolbar

It will include a fixed positioned panel on your page including a bunch of server-side inspection, including request vars, environ variables, and logs. It works with Flask, and there's a version for Django as well.

Re:Server side logging to Chrome console from PHP and Python by j_s on Tuesday April 09, 2013 @06:20PM (#5521807)
http://getglimpse.com/

  > Glimpse gathers and presents detailed diagnostic information about the 
  > behavior and execution of your web application.

  > It is used in a similar manner to client side diagnostics and debugging 
  > tools (such as FireBug or Chrome Developer Tools), but instead focuses on 
  > concepts such as server configuration, model binding, url routing, and 
  > execution profiling.
Currently implemented for .NET; it has a pretty shiny cross-browser UI which might be useful as a target instead of the Chrome console.
Re:Server side logging to Chrome console from PHP and Python by hxseven on Thursday April 11, 2013 @08:41AM (#5531521)
They should really put some screenshots on the website, everybody wants screenshots... had to use Google Images to see how it looks ;)

For everybody who also wants to see screenshots, found some in this blog article: http://blog.getglimpse.com/2013/03/27/glimpse-1-2-released-w...

The interface looks quite nice...

Re:Server side logging to Chrome console from PHP and Python by toddmorey on Tuesday April 09, 2013 @01:51PM (#5519770)
This is fantastic. There have been a few times where I've thought to myself it would be handy to have a view of server-side events in the inspector. Very eager to spend some time later today to get this set up.
Re:Server side logging to Chrome console from PHP and Python by Mahn on Tuesday April 09, 2013 @04:40PM (#5521190)
Happy to see this here, been using ChromePHP for quite some time now. The only complain I have is how it lacks support for styled logs[1], since it could come handy to apply different colors to different segments of the logs when they start to build up, but otherwise I'm a fan.

[1] https://plus.google.com/+AddyOsmani/posts/TanDFKEN9Kn

Re:Server side logging to Chrome console from PHP and Python by craigc on Tuesday April 09, 2013 @06:10PM (#5521750)
With the new version I added support for setting some colors! Right click on the extension icon and select options. I may add more options in the future as well.
Re:Server side logging to Chrome console from PHP and Python by Mahn on Wednesday April 10, 2013 @10:51AM (#5525462)
I was talking more about the ability to style specific log lines programmatically. So that one could have sql queries blue, redis commands red, etc etc.
Re:Server side logging to Chrome console from PHP and Python by pindi on Tuesday April 09, 2013 @05:07PM (#5521385)
You may want to mention that the Python library is not thread-safe, since it essentially uses a global variable to store the logged statements until the middleware writes them to the response. Shouldn't be a problem when used with a development server, though.
Re:Server side logging to Chrome console from PHP and Python by craigc on Tuesday April 09, 2013 @06:12PM (#5521764)
Thanks. I will add it to the GitHub wiki. I should also point out that in general this stuff was not designed to run in production.
Re:Server side logging to Chrome console from PHP and Python by pekk on Tuesday April 09, 2013 @06:32PM (#5521868)
In general, it seems like people have a hard time understanding what doesn't belong in production.
Re:Server side logging to Chrome console from PHP and Python by whichdan on Tuesday April 09, 2013 @06:57PM (#5522020)
I've been using this with ChromePhp and it works fantastically well. It sends all of the data as part of the page's header, so you don't have to worry about something hacky like injected console.log calls.
Re:Server side logging to Chrome console from PHP and Python by thebuccaneer on Tuesday April 09, 2013 @03:17PM (#5520465)
Isn't this a bit like FirePHP (except FirePHP has more browser support) ?
Re:Server side logging to Chrome console from PHP and Python by Mahn on Tuesday April 09, 2013 @04:47PM (#5521245)
Yes, but FirePHP was definitively not available for Chrome when ChromePHP (now Chrome Logger) first came out, and as far as I can see (http://www.firephp.org/) it doesn't officially support it yet.
Re:Server side logging to Chrome console from PHP and Python by ericcholis on Tuesday April 09, 2013 @01:18PM (#5519544)
Very useful if you don't want to or can't use xdebug for PHP.
Re:Server side logging to Chrome console from PHP and Python by Mahn on Tuesday April 09, 2013 @04:43PM (#5521211)
Actually if you implement logging extensively throughout your app, you might find you need to use xdebug much less. I used xdebug often before implementing ChromePHP, but nowadays I rarely do, since the vast majority of the issues are easy to pinpoint with the logs.
Re:Server side logging to Chrome console from PHP and Python by addandsubtract on Tuesday April 09, 2013 @01:15PM (#5519520)
Have been using this for a while debugging PHP. Amazingly useful.
Re:Server side logging to Chrome console from PHP and Python by craigc on Tuesday April 09, 2013 @01:16PM (#5519527)
Thanks! I basically rewrote the extension, added Python support, support for colors in the console, and added a tech spec to make it easy to implement the protocol in any language.

http://craig.is/writing/chrome-logger/techspecs

Re:Server side logging to Chrome console from PHP and Python by karolisd on Tuesday April 09, 2013 @02:07PM (#5519899)
Is there anything like this for Ruby?
Re:Server side logging to Chrome console from PHP and Python by craigc on Tuesday April 09, 2013 @02:22PM (#5520009)
It's an open protocol so someone just has to write a gem for it. My friend Kevin at VHX is working on a ruby port.

https://twitter.com/ksheurs

Re:Server side logging to Chrome console from PHP and Python by dannytatom on Tuesday April 09, 2013 @02:22PM (#5520005)
A quick google led me to this: https://github.com/mrbrdo/rack-webconsole
Re:Server side logging to Chrome console from PHP and Python by cookrn on Wednesday April 10, 2013 @02:59AM (#5523627)
Just finished a ruby implementation:

https://rubygems.org/gems/chrome_logger

You can now use the plugin with any Rack compatible Ruby framework.

Re:Server side logging to Chrome console from PHP and Python by coolsunglasses on Tuesday April 09, 2013 @02:06PM (#5519894)
I wonder how hard it would be to use the reflect package to make this work in Go?
Re:Server side logging to Chrome console from PHP and Python by hxseven on Thursday April 11, 2013 @09:19AM (#5531739)
Shouldn't be that hard. You just need to encode the data in JSON and BASE64 and add it as HTTP header. Just look at the existing libraries, they don't seem to be that complicated.