mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-14 15:33:49 +00:00
Fix typo in run_services(). Print random stuff on STDERR as warnings.
This commit is contained in:
@@ -4925,7 +4925,7 @@ sub start_online_logging {
|
|||||||
while ( defined(my $line = shift @$lines) ) {
|
while ( defined(my $line = shift @$lines) ) {
|
||||||
my ($ts, $level, $n_lines, $msg) = $line =~ m/^([^,]+),([^,]+),([^,]+),(.+)/s;
|
my ($ts, $level, $n_lines, $msg) = $line =~ m/^([^,]+),([^,]+),([^,]+),(.+)/s;
|
||||||
if ( !$ts || !$level || !$n_lines || !$msg ) {
|
if ( !$ts || !$level || !$n_lines || !$msg ) {
|
||||||
warn "Invalid log entry: $line\n";
|
warn "$line\n";
|
||||||
next LINE;
|
next LINE;
|
||||||
}
|
}
|
||||||
if ( $n_lines > 1 ) {
|
if ( $n_lines > 1 ) {
|
||||||
@@ -6570,12 +6570,10 @@ sub make_new_crontab {
|
|||||||
sub run_services {
|
sub run_services {
|
||||||
my (%args) = @_;
|
my (%args) = @_;
|
||||||
have_required_args(\%args, qw(
|
have_required_args(\%args, qw(
|
||||||
api_key
|
|
||||||
action
|
action
|
||||||
services
|
services
|
||||||
lib_dir
|
lib_dir
|
||||||
)) or die;
|
)) or die;
|
||||||
my $api_key = $args{api_key};
|
|
||||||
my $action = $args{action};
|
my $action = $args{action};
|
||||||
my $services = $args{services};
|
my $services = $args{services};
|
||||||
my $lib_dir = $args{lib_dir};
|
my $lib_dir = $args{lib_dir};
|
||||||
|
@@ -134,7 +134,7 @@ sub start_online_logging {
|
|||||||
# $line = ts,level,n_lines,message
|
# $line = ts,level,n_lines,message
|
||||||
my ($ts, $level, $n_lines, $msg) = $line =~ m/^([^,]+),([^,]+),([^,]+),(.+)/s;
|
my ($ts, $level, $n_lines, $msg) = $line =~ m/^([^,]+),([^,]+),([^,]+),(.+)/s;
|
||||||
if ( !$ts || !$level || !$n_lines || !$msg ) {
|
if ( !$ts || !$level || !$n_lines || !$msg ) {
|
||||||
warn "Invalid log entry: $line\n";
|
warn "$line\n";
|
||||||
next LINE;
|
next LINE;
|
||||||
}
|
}
|
||||||
if ( $n_lines > 1 ) {
|
if ( $n_lines > 1 ) {
|
||||||
|
Reference in New Issue
Block a user