[Jifty-commit] r3532 - in jifty/trunk/lib/Jifty/Plugin: .
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Jun 19 18:56:51 EDT 2007
Author: clkao
Date: Tue Jun 19 18:56:51 2007
New Revision: 3532
Added:
jifty/trunk/lib/Jifty/Plugin/Debug/
jifty/trunk/lib/Jifty/Plugin/Debug.pm
jifty/trunk/lib/Jifty/Plugin/Debug/Dispatcher.pm
Log:
debug plugin for logging dispatched rules and current user.
Added: jifty/trunk/lib/Jifty/Plugin/Debug.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Debug.pm Tue Jun 19 18:56:51 2007
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+
+package Jifty::Plugin::Debug;
+use base qw/Jifty::Plugin/;
+
+1;
Added: jifty/trunk/lib/Jifty/Plugin/Debug/Dispatcher.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Debug/Dispatcher.pm Tue Jun 19 18:56:51 2007
@@ -0,0 +1,12 @@
+use warnings;
+use strict;
+
+package Jifty::Plugin::Debug::Dispatcher;
+use Jifty::Dispatcher -base;
+
+on qr'(.*)' => run {
+ Jifty->log->debug("[$$] $1 ".(Jifty->web->current_user->id ? Jifty->web->current_user->username : ''));
+};
+
+1;
+
More information about the Jifty-commit
mailing list