my $error = $path
? qq/Unknown resource "$path"/
: "No default action defined";
- $c->log->error($error) if $c->debug;
+ $c->trace(1, $error);
$c->error($error);
}
}
my ( $self, $c, $command, @extra_params ) = @_;
unless ($command) {
- $c->log->debug('Nothing to go to') if $c->debug;
+ $c->trace(1,'Nothing to go to');
return 0;
}
if($error) {
$c->error($error);
- $c->log->debug($error) if $c->debug;
+ $c->trace(1,$error);
return 0;
}
my $error .= qq/Couldn't $opname to command "$command": /
.qq/Invalid action or component./;
$c->error($error);
- $c->log->debug($error) if $c->debug;
+ $c->trace(1,$error);
return 0;
}
my $error =
qq/Couldn't forward to "$component_class". Does not implement "$method"/;
$c->error($error);
- $c->log->debug($error)
- if $c->debug;
+ $c->trace(1,$error);
return 0;
}
}
s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg for grep { defined } @{$req->captures||[]};
- $c->log->debug( 'Path is "' . $req->match . '"' )
- if ( $c->debug && defined $req->match && length $req->match );
+ $c->trace(1, 'Path is "' . $req->match . '"' )
+ if (defined $req->match && length $req->match );
- $c->log->debug( 'Arguments are "' . join( '/', @args ) . '"' )
- if ( $c->debug && @args );
+ $c->trace(1, 'Arguments are "' . join( '/', @args ) . '"' )
+ if @args;
}
=head2 $self->get_action( $action, $namespace )
$self->_load_dispatch_types( @{ $self->postload_dispatch_types } );
- return unless $c->debug;
+ return unless $c->trace_level;
$self->_display_action_tables($c);
}
};
$walker->( $walker, $self->_tree, '' );
- $c->log->debug( "Loaded Private actions:\n" . $privates->draw . "\n" )
+ $c->trace(1, "Loaded Private actions:\n" . $privates->draw . "\n" )
if $has_private;
# List all public actions