Skip to content

Commit 00ae2c9

Browse files
authored
Merge pull request #798 from jesusbagpuss/issue-797
Improve regexes for log-file error and warning counts (fixed #797)
2 parents 66fdb93 + 197e472 commit 00ae2c9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

mysqltuner.pl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,12 +1590,9 @@ sub log_file_recommendations {
15901590
while ( my $logLi = <$fh> ) {
15911591
chomp $logLi;
15921592
$numLi++;
1593-
debugprint "$numLi: $logLi"
1594-
if $logLi =~ /warning|error/i and $logLi !~ /Logging to/;
1595-
$nbErrLog++
1596-
if $logLi =~ /error/i
1597-
and $logLi !~ /(Logging to|\[Warning\].*ERROR_FOR_DIVISION_BY_ZERO)/;
1598-
$nbWarnLog++ if $logLi =~ /warning/i;
1593+
debugprint "$numLi: $logLi" if $logLi =~ /\[(warning|error)\]/i;
1594+
$nbErrLog++ if $logLi =~ /\[error\]/i;
1595+
$nbWarnLog++ if $logLi =~ /\[warning\]/i;
15991596
push @lastShutdowns, $logLi
16001597
if $logLi =~ /Shutdown complete/ and $logLi !~ /Innodb/i;
16011598
push @lastStarts, $logLi if $logLi =~ /ready for connections/;

0 commit comments

Comments
 (0)