mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-04-28 10:52:49 +00:00
pvestatd: log warnings to syslog
This commit is contained in:
parent
e0dc09ad0f
commit
780fbb4b2a
10
bin/pvestatd
10
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');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user