diff options
-rwxr-xr-x | iurt2 | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -199,7 +199,8 @@ $run{todo} = []; sub { $run{log} = pop @_; open my $log, ">$run{log}" or die "unable to open $run{log}\n"; - $run{LOG} = sub { print $log @_ }; + $run{LOG} = sub { print $log @_ }; + $run{logfd} = $log; print *$log, "command line: @ARGV\n"; 1; }, "Log file" ], @@ -359,7 +360,7 @@ $run{todo} = []; open(my $LOG, ">&STDERR"); $run{LOG} = sub { print $LOG @_ }; -plog_init($program_name, $LOG, 7, 1); # For parsing command line +plog_init($program_name, $run{logfd}||$LOG, 7, 1); # For parsing command line # Display version information # @@ -378,7 +379,7 @@ foreach my $t (@$todo) { } # Use the real verbose level -plog_init($program_name, $LOG, $run{verbose}, 1); +plog_init($program_name, $run{logfd}||$LOG, $run{verbose}, 1); $run{distro_tag} = $run{distro}; $run{distro_tag} =~ s,/,-,g; |