Files | Admin

Notes:

Release Name: 0.0.5

Notes:
Clogger is Rack middleware for logging HTTP requests.  The log format
is customizable so you can specify exactly which fields to log.

The following variables are now exposed: $request_method,
$content_length and $content_type.  Additionally, attempts
to use $http_content_length or $http_content_type will be
remapped to use the non-"$http_"-prefixed variable instead
since the "$http_"-variants of those variables is not allowed
by Rack.



Changes: History.txt | 9 +++++++++ README.txt | 11 ++++++++--- lib/clogger.rb | 7 +++++-- test/test_clogger.rb | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 5 deletions(-) commit afaa8efb31094a831a68b383523f9bac46a244ac Author: Eric Wong <normalperson@yhbt.net> Date: Wed Sep 2 18:44:55 2009 -0700 clogger 0.0.5 commit 5fd5bb6aa884ec8f2c62a5edaae6b93ec8275f2e Author: Eric Wong <normalperson@yhbt.net> Date: Wed Sep 2 18:40:02 2009 -0700 README: minor updates and clarifications * link to Clogger::Format when talking about predefined formats * use upper-case for escape chars since that's what we use * clarify $request_time{PRECISION} range commit 3bc7000a34c8e1788a5951381c7007f617233da2 Author: Eric Wong <normalperson@yhbt.net> Date: Wed Sep 2 18:29:58 2009 -0700 alias $http_content_{length,type} to $content_{length,type} Since Rack doesn't allow the HTTP_CONTENT_{LENGTH,TYPE} headers, alias attempts to use those to the non-"HTTP_"-prefixed equivalents to avoid confusion on the user side (nginx also does this). commit 41e3dcf47d8ee855747681b80dab1c3b9d6bc457 Author: Eric Wong <normalperson@yhbt.net> Date: Wed Sep 2 18:21:09 2009 -0700 expose the $content_length/$content_type variables Since the HTTP_CONTENT_LENGTH and HTTP_CONTENT_TYPE variables are not allowed by Rack, we need to allow access to the CGI variables instead. commit 34bda71752bc7401c552a7a4d5b77cf7e1bfe431 Author: Eric Wong <normalperson@yhbt.net> Date: Wed Sep 2 18:15:27 2009 -0700 expose $request_method as documented in the README Accessing "REQUEST_METHOD" in the Rack env should be doable as a CGI-ish variable. Thanks to IƱaki Baz Castillo for spotting the issue and reporting it to me.