[pve-devel] [PATCH storage v4 3/4] Switched to using log_warn of PVE::RESTEnvironment
Daniel Tschlatscher
d.tschlatscher at proxmox.com
Tue Jun 14 11:00:12 CEST 2022
Signed-off-by: Daniel Tschlatscher <d.tschlatscher at proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner at proxmox.com>
---
Changes from v3
* No fix #xxxx in commit title
* Added import for PVE::RESTEnvironment to call log_warn directly
PVE/Storage.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PVE/Storage.pm b/PVE/Storage.pm
index 97ea64e..0d53ba2 100755
--- a/PVE/Storage.pm
+++ b/PVE/Storage.pm
@@ -23,6 +23,7 @@ use PVE::JSONSchema;
use PVE::INotify;
use PVE::RPCEnvironment;
use PVE::SSHInfo;
+use PVE::RESTEnvironment qw(log_warn);
use PVE::Storage::Plugin;
use PVE::Storage::DirPlugin;
@@ -1602,7 +1603,7 @@ sub archive_auxiliaries_remove {
my $path = "$dirname/$filename";
if (-e $path) {
- unlink $path or $! == ENOENT or warn "Removing $type file failed: $!\n";
+ unlink $path or $! == ENOENT or log_warn("Removing $type file failed: $!");
}
}
}
--
2.30.2
More information about the pve-devel
mailing list