[Jifty-commit] r2977 - in jifty/trunk: lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Mar 16 01:08:49 EDT 2007


Author: jesse
Date: Fri Mar 16 01:08:46 2007
New Revision: 2977

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Dispatcher.pm

Log:
 r53499 at pinglin:  jesse | 2007-03-16 00:31:56 -0400
  * slightly better debug logging from the jifty dispatcher


Modified: jifty/trunk/lib/Jifty/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Dispatcher.pm	(original)
+++ jifty/trunk/lib/Jifty/Dispatcher.pm	Fri Mar 16 01:08:46 2007
@@ -925,7 +925,7 @@
 
 sub _match_method {
     my ( $self, $method ) = @_;
-    $self->log->debug("Matching URL $ENV{REQUEST_METHOD} against ".$method);
+    #$self->log->debug("Matching URL $ENV{REQUEST_METHOD} against ".$method);
     lc( $ENV{REQUEST_METHOD} ) eq lc($method);
 }
 
@@ -1273,12 +1273,11 @@
     no strict 'refs';
     foreach my $stage ( qw/SETUP RUN CLEANUP/ ) {
 
-        my $log = '';
+        Jifty->log->debug( "Dispatcher rules in stage $stage:");
         foreach my $r ( @{ $self . '::RULES_' . $stage } ) {
-            $log .= _unroll_dumpable_rules( 0,$r );
+            Jifty->log->debug( _unroll_dumpable_rules( 0,$r ) );
         }
 
-        Jifty->log->debug( "Rules in stage $stage:\n", $log) if ($log);
     }
 };
 
@@ -1291,7 +1290,7 @@
 
 sub _unroll_dumpable_rules {
     my ($level, $rule) = @_;
-    my $log =
+    my $log = 
         # indentation
         ( "    " x $level ) .
         # op
@@ -1303,16 +1302,14 @@
             ref $rule->[1] eq 'HASH'  ? $rule->[1]->{method} . " '" . $rule->[1]->{""} ."'" :
             ref $rule->[1] eq 'CODE'  ? '{...}' :
                                         "'" . $rule->[1] . "'"
-        ) .
-        "\n";
+        );
 
     if (ref $rule->[2] eq 'ARRAY') {
         $level++;
         foreach my $sr ( @{ $rule->[2] } ) {
-            $log .= _unroll_dumpable_rules( $level, $sr );
+            $log .=   _unroll_dumpable_rules( $level, $sr );
         }
     }
-
     return $log;
 }
 


More information about the Jifty-commit mailing list