diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2010-01-18 13:16:28 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2010-01-18 13:16:28 +0000 |
commit | bb559b58b6c97b47b9051e78c933bd1a076d9787 (patch) | |
tree | fa2e83d1d07aac010c36bf1436ccaf729d2b54de /iurt2 | |
parent | 0d32176a58601f200fe1a5b6a9fda04a44222fe8 (diff) | |
download | iurt-bb559b58b6c97b47b9051e78c933bd1a076d9787.tar iurt-bb559b58b6c97b47b9051e78c933bd1a076d9787.tar.gz iurt-bb559b58b6c97b47b9051e78c933bd1a076d9787.tar.bz2 iurt-bb559b58b6c97b47b9051e78c933bd1a076d9787.tar.xz iurt-bb559b58b6c97b47b9051e78c933bd1a076d9787.zip |
- Fix --log option
Diffstat (limited to 'iurt2')
-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; |