From 9cdc96f44f4de5d4044d4d66b710444f2878b3b5 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Fri, 12 Nov 2021 07:26:48 +0000 Subject: [PATCH] show command line upon re-exec (log_level=trace) --- lib/App/MPD/Feeder.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/App/MPD/Feeder.pm b/lib/App/MPD/Feeder.pm index c495f9c..dfb83c7 100644 --- a/lib/App/MPD/Feeder.pm +++ b/lib/App/MPD/Feeder.pm @@ -515,7 +515,12 @@ SQL $log->notice("disconnecting"); $self->stop; - exec( "$0", '--config', $self->cfg_file, '--skip-db-update' ); + my @exec = ( $0, '--config', $self->cfg_file, '--skip-db-update' ); + if ( $log->is_trace ) { + $log->trace( 'exec ' + . join( ' ', map { /\s/ ? "'$_'" : $_ } @exec ) ); + } + exec(@exec); } if ( 'quit' eq $result ) { -- 2.39.5