mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-26 23:45:44 +00:00
Fix it again--the pitfalls of working so long and late.
This commit is contained in:
15
bin/pt-agent
15
bin/pt-agent
@@ -4971,15 +4971,14 @@ sub start_online_logging {
|
||||
);
|
||||
};
|
||||
if ( my $e = $EVAL_ERROR ) {
|
||||
if ( $n_errors > 10 ) {
|
||||
my $ts = ts(time, 1); # 1=UTC
|
||||
warn "$ts WARNING $n_errors consecutive errors, no more "
|
||||
. "error messages will be printed until log entries "
|
||||
. "are sent successfully again.\n";
|
||||
}
|
||||
else {
|
||||
if ( ++$n_errors < 10 ) {
|
||||
warn "Error sending log entry to API: $e";
|
||||
$n_errors++;
|
||||
if ( $n_errors >= 10 ) {
|
||||
my $ts = ts(time, 1); # 1=UTC
|
||||
warn "$ts WARNING $n_errors consecutive errors, no more "
|
||||
. "error messages will be printed until log entries "
|
||||
. "are sent successfully again.\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user