diff options
author | Florian Pritz <bluewind@xinu.at> | 2017-04-02 13:09:18 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2017-04-02 13:42:15 +0200 |
commit | 6abe30a71dbf2938ca8e6efdfa53f0b7f6732d38 (patch) | |
tree | 4986f131fffd9835d40c7e0d8c2ecde05eef4a3f /lib | |
parent | d6f2988591408eec0e6c227ea07791927edcc55b (diff) | |
download | App-BorgRestore-6abe30a71dbf2938ca8e6efdfa53f0b7f6732d38.tar.gz App-BorgRestore-6abe30a71dbf2938ca8e6efdfa53f0b7f6732d38.tar.xz |
Use logger everywhere in main package
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/App/BorgRestore.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/App/BorgRestore.pm b/lib/App/BorgRestore.pm index a424dff..749f60b 100644 --- a/lib/App/BorgRestore.pm +++ b/lib/App/BorgRestore.pm @@ -124,7 +124,7 @@ sub find_archives { } if (!@ret) { - printf "\e[0;91mWarning:\e[0m Path '%s' not found in any archive.\n", $path; + $log->warningf("Path '%s' not found in any archive.\n", $path); } @ret = sort { $a->{modification_time} <=> $b->{modification_time} } @ret; @@ -139,7 +139,7 @@ sub select_archive_timespec { my $seconds = $self->_timespec_to_seconds($timespec); if (!defined($seconds)) { - say STDERR "Error: Invalid time specification"; + $log->error("Invalid time specification"); return; } @@ -209,7 +209,7 @@ sub restore { $path = App::BorgRestore::Helper::untaint($path, qr(.*)); my $archive_name = App::BorgRestore::Helper::untaint_archive_name($archive->{archive}); - printf "Restoring %s to %s from archive %s\n", $path, $destination, $archive->{archive}; + $log->infof("Restoring %s to %s from archive %s", $path, $destination, $archive->{archive}); my $basename = basename($path); my $components_to_strip =()= $path =~ /\//g; |