+my $set_global_log_ratelimit = sub {
+ my $cluster_opts = shift;
+
+ $global_log_ratelimit = '--limit 1/sec';
+ if (defined(my $log_rlimit = $cluster_opts->{log_ratelimit})) {
+ my $ll_format = $cluster_option_properties->{log_ratelimit}->{format};
+ my $limit = PVE::JSONSchema::parse_property_string($ll_format, $log_rlimit);
+
+ if ($limit->{enable}) {
+ if (my $rate = $limit->{rate}) {
+ $global_log_ratelimit = "--limit $rate";
+ }
+ if (my $burst = $limit->{burst}) {
+ $global_log_ratelimit .= " --limit-burst $burst";
+ }
+ } else {
+ $global_log_ratelimit = undef;
+ }
+ }
+};
+