The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

init

init installs the trigger needed before each HTTP request. It also establishes the baseline for all times and creates the log path.

before_request

Log as much of the request state as we can.

before_cleanup

Append the current user to the request log. This isn't done in one fell swoop because if the server explodes during a request, we would lose the request's data for logging.

This, strictly speaking, isn't necessary. But we don't always want to lug the sessions table around, so this gets us most of the way there.

logged_request is checked to ensure that we don't append the current user if the current request couldn't be logged for whatever reason (perhaps a serialization error?).

get_loghandle

Creates the loghandle. The created file is named PATH/BOOTTIME-PID.log.

Returns undef on error.

NAME

Jifty::Plugin::Recorder - record HTTP requests for playback

DESCRIPTION

This plugin will log all HTTP requests as YAML. The logfiles can be used by jifty playback (provided with this plugin) to replay the logged requests. This can be handy for perfomance tuning, debugging, and testing.

USAGE

Add the following to your site_config.yml

 framework:
   Plugins:
     - Recorder: {}

OPTIONS

path

The path for creating request logs. Default: log/requests. This directory will be created for you, if necessary.

memory_usage

Report how much memory (in bytes) Jifty is taking up. This uses Proc::ProcessTable. Default is off.

SEE ALSO

Jifty::Plugin::Recorder::Command::Playback, HTTP::Server::Simple::Recorder

COPYRIGHT AND LICENSE

Copyright 2007 Best Practical Solutions

This is free software and may be modified and distributed under the same terms as Perl itself.