httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Dorn <christ...@christophdorn.com>
Subject Analyze mod_rewrite log in browser
Date Wed, 16 Apr 2008 19:57:15 GMT
I am the developer of FirePHP (http://www.firephp.org/) which is a
debugging tool for PHP. It allows you to print debug messages from PHP
on the server to the Firebug (http://www.getfirebug.com/) Console. It
sends the debug data in the response headers instead of the response
body so that page rendering in the browse is not affected.

I was wondering if it would be useful for a lot of mod_rewrite users to
be able to view the rewrite log in their Firebug console instead of
having to go to the server logs. FirePHP could display the rewrite log
in a custom renderer that presents the log data in a more intuitive
format with links to reference documentation etc...

There could be a new configuration directive for mod_rewrite that
enables the sending of the rewrite log for specific IP's for instance.
This would also be useful in that rewrite logging would not need to be
turned on for all users.

The data in the header looks something like this:

X-FirePHP-Data-100000000001	{
X-FirePHP-Data-300000000001	"FirePHP.Firebug.Console":[
X-FirePHP-Data-399999999999	["__SKIP__"]],
X-FirePHP-Data-999999999999	"__SKIP__":"__SKIP__"}
X-FirePHP-Data-200000000001	"FirePHP.Dump":{
X-FirePHP-Data-299999999999	"__SKIP__":"__SKIP__"},
X-FirePHP-Data-355892512100	["LOG","Hello World"],
X-FirePHP-Data-355892528800	["LOG","Log message"],
X-FirePHP-Data-355892542900	["INFO","Info message"],
X-FirePHP-Data-355892557000	["WARN","Warn message"],
X-FirePHP-Data-355892571600	["ERROR","Error message"],
X-FirePHP-Data-355892599600	["LOG",["Label","Message with label"]],

It is simply a JSON (http://www.json.org) string that is broken up into
different sections which are sorted by their numeric index. mod_rewrite
could thus insert its log messages into an existing structure or
create its own if it did not receive one from the application.

You can see how this looks in the Firebug Console at:
http://www.firephp.org/

Is this something that would be useful to have for mod_rewrite users?

Could this be added to the default mod_rewrite module? A separate module?

Looking forward to your feedback.

Christoph



Mime
View raw message