1
0
mirror of https://gitlab.com/depesz/explain.depesz.com.git synced 2024-11-28 08:58:52 +02:00

Add logging of bad plans

Sometimes people complain about unparse-able plans. Let's see them.
This commit is contained in:
Hubert depesz Lubaczewski 2023-12-27 14:17:40 +01:00
parent e00909949f
commit 463bad4f9d
2 changed files with 2 additions and 2 deletions

View File

@ -21,6 +21,5 @@ requires 'Mojolicious';
requires 'Pg::Explain', '>= 2.4'; requires 'Pg::Explain', '>= 2.4';
requires 'Number::Bytes::Human'; requires 'Number::Bytes::Human';
requires 'Pg::SQL::PrettyPrinter'; requires 'Pg::SQL::PrettyPrinter';
requires 'MojoX::Log::Rotate'
# vim: set ft=perl: # vim: set ft=perl:

View File

@ -249,7 +249,8 @@ sub index {
if ( $EVAL_ERROR ) { if ( $EVAL_ERROR ) {
# log message # log message
$self->app->log->info( $EVAL_ERROR ); $self->app->log->error( $EVAL_ERROR );
$self->app->log->error( "Given plan: " . $plan );
# leave... # leave...
return $self->render( 'message' => q|Failed to parse your plan:|, 'details' => $EVAL_ERROR ); return $self->render( 'message' => q|Failed to parse your plan:|, 'details' => $EVAL_ERROR );