Skip to content

Commit

Permalink
Merge pull request #798 from jesusbagpuss/issue-797
Browse files Browse the repository at this point in the history
Improve regexes for log-file error and warning counts (fixed #797)
  • Loading branch information
jmrenouard authored Sep 6, 2024
2 parents 66fdb93 + 197e472 commit 00ae2c9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions mysqltuner.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1590,12 +1590,9 @@ sub log_file_recommendations {
while ( my $logLi = <$fh> ) {
chomp $logLi;
$numLi++;
debugprint "$numLi: $logLi"
if $logLi =~ /warning|error/i and $logLi !~ /Logging to/;
$nbErrLog++
if $logLi =~ /error/i
and $logLi !~ /(Logging to|\[Warning\].*ERROR_FOR_DIVISION_BY_ZERO)/;
$nbWarnLog++ if $logLi =~ /warning/i;
debugprint "$numLi: $logLi" if $logLi =~ /\[(warning|error)\]/i;
$nbErrLog++ if $logLi =~ /\[error\]/i;
$nbWarnLog++ if $logLi =~ /\[warning\]/i;
push @lastShutdowns, $logLi
if $logLi =~ /Shutdown complete/ and $logLi !~ /Innodb/i;
push @lastStarts, $logLi if $logLi =~ /ready for connections/;
Expand Down

0 comments on commit 00ae2c9

Please sign in to comment.