[Jifty-commit] r1322 - jifty/trunk/lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Jun 20 11:34:06 EDT 2006
Author: dpavlin
Date: Tue Jun 20 11:33:54 2006
New Revision: 1322
Modified:
jifty/trunk/lib/Jifty/Action.pm
Log:
dump field warnings and errors to debug log
Modified: jifty/trunk/lib/Jifty/Action.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action.pm (original)
+++ jifty/trunk/lib/Jifty/Action.pm Tue Jun 20 11:33:54 2006
@@ -169,6 +169,18 @@
$self->log->debug("Running action");
unless ($self->result->success) {
$self->log->debug("Not taking action, as it doesn't validate");
+
+ # dump field warnings and errors to debug log
+ foreach my $what (qw/warnings errors/) {
+ my $f = "field_" . $what;
+ my @r =
+ map {
+ $_ . ": " . $self->result->{$f}->{$_}
+ } grep { $self->result->{$f}->{$_} }
+ keys %{ $self->result->{$f} };
+ $self->log->debug("Action result $what:\n\t", join("\n\t", @r)) if (@r);
+ }
+
return;
}
$self->log->debug("Taking action");
More information about the Jifty-commit
mailing list