[Jifty-commit] r3591 - in jifty/trunk: lib/Jifty/Plugin
lib/Jifty/Plugin/Debug
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Jul 1 20:35:13 EDT 2007
Author: sterling
Date: Sun Jul 1 20:35:12 2007
New Revision: 3591
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/Debug.pm
jifty/trunk/lib/Jifty/Plugin/Debug/Dispatcher.pm
Log:
r7908 at dynpc145: andrew | 2007-07-01 19:34:08 -0500
Adding documentation to Jifty::Plugin::Debug to fix POD coverage failures.
Modified: jifty/trunk/lib/Jifty/Plugin/Debug.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Debug.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Debug.pm Sun Jul 1 20:35:12 2007
@@ -4,4 +4,14 @@
package Jifty::Plugin::Debug;
use base qw/Jifty::Plugin/;
+=head1 NAME
+
+Jifty::Plugin::Debug - a plugin to log each incoming request
+
+=head1 DESCRIPTION
+
+Enable this plugin in your F<etc/config.yml> (requires no configuration) and the plugin add an INFO level log message on each request received. It will contain the PID of the current process, the URL requested, and the username (if any) of the person making the request.
+
+=cut
+
1;
Modified: jifty/trunk/lib/Jifty/Plugin/Debug/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Debug/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/Debug/Dispatcher.pm Sun Jul 1 20:35:12 2007
@@ -4,6 +4,22 @@
package Jifty::Plugin::Debug::Dispatcher;
use Jifty::Dispatcher -base;
+=head1 NAME
+
+Jifty::Plugin::Debug::Dispatcher - dispatcher for the debug plugin
+
+=head1 DESCRIPTION
+
+This adds a debugging rule to record debugging information about every request.
+
+=head1 RULES
+
+=head2 on qr'(.*)'
+
+Records the request. The INFO level log message recorded contains the PID of the current process, the URL requested, and the username (if any) attached to the current session.
+
+=cut
+
on qr'(.*)' => run {
Jifty->log->info("[$$] $1 ".(Jifty->web->current_user->id ? Jifty->web->current_user->username : ''));
};
More information about the Jifty-commit
mailing list