From: adam Date: Fri, 20 Oct 2006 02:15:19 +0000 (+0000) Subject: Added logging to 4xx status handlers X-Git-Tag: 1.08~292 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=edab9038aa7b1c76d52ab17b4e521ca8dfa8e54c;p=catagits%2FCatalyst-Action-Serialize-Data-Serializer.git Added logging to 4xx status handlers --- diff --git a/Changelog b/Changelog index 31cffc2..36342c0 100644 --- a/Changelog +++ b/Changelog @@ -10,4 +10,5 @@ Wed Oct 18 17:29:07 PDT 2006 (adam) Thu Oct 19 16:04:33 PDT 2006 (adam) Converted error helpers to return an object instead of plain-text. It's a more consistent model than a text/plain error message. + Added logging to 4xx status handlers diff --git a/lib/Catalyst/Controller/REST.pm b/lib/Catalyst/Controller/REST.pm index 321037a..91434b5 100644 --- a/lib/Catalyst/Controller/REST.pm +++ b/lib/Catalyst/Controller/REST.pm @@ -71,6 +71,7 @@ sub status_bad_request { ); $c->response->status(400); + $c->log->debug("Status Bad Request: " . $p{'message'}); $self->_set_entity($c, { error => $p{'message'} }); return 1; } @@ -85,6 +86,7 @@ sub status_not_found { ); $c->response->status(404); + $c->log->debug("Status Not Found: " . $p{'message'}); $self->_set_entity($c, { error => $p{'message'} }); return 1; }