diff --git a/bin/pvestatd b/bin/pvestatd index 98033ad9..5cd727e9 100755 --- a/bin/pvestatd +++ b/bin/pvestatd @@ -5,8 +5,18 @@ use warnings; use PVE::INotify; use PVE::RPCEnvironment; +use PVE::SafeSyslog; use PVE::Service::pvestatd; +$SIG{'__WARN__'} = sub { + my $err = $@; + my $t = $_[0]; + chomp $t; + print STDERR "$t\n"; + syslog('warning', "%s", $t); + $@ = $err; +}; + my $prepare = sub { my $rpcenv = PVE::RPCEnvironment->init('priv');