|
@@ -57,6 +57,7 @@ sub analyze
|
|
|
|
|
|
|
|
# Just initialize these to 0
|
|
# Just initialize these to 0
|
|
|
$stats{days} = 0;
|
|
$stats{days} = 0;
|
|
|
|
|
+ $stats{parsedlines} = 0;
|
|
|
$stats{totallines} = 0;
|
|
$stats{totallines} = 0;
|
|
|
|
|
|
|
|
if ($self->{cfg}->{logdir}) {
|
|
if ($self->{cfg}->{logdir}) {
|
|
@@ -253,7 +254,7 @@ sub _parse_file
|
|
|
$state->{oldtime} = $hour;
|
|
$state->{oldtime} = $hour;
|
|
|
|
|
|
|
|
if (!is_ignored($nick)) {
|
|
if (!is_ignored($nick)) {
|
|
|
- $stats->{totallines}++;
|
|
|
|
|
|
|
+ $stats->{parsedlines}++;
|
|
|
|
|
|
|
|
# Timestamp collecting
|
|
# Timestamp collecting
|
|
|
$stats->{times}{$hour}++;
|
|
$stats->{times}{$hour}++;
|
|
@@ -335,7 +336,7 @@ sub _parse_file
|
|
|
|
|
|
|
|
# Match action lines.
|
|
# Match action lines.
|
|
|
elsif ($hashref = $self->{parser}->actionline($line, $.)) {
|
|
elsif ($hashref = $self->{parser}->actionline($line, $.)) {
|
|
|
- $stats->{totallines}++;
|
|
|
|
|
|
|
+ $stats->{parsedlines}++;
|
|
|
|
|
|
|
|
my ($hour, $nick, $saying);
|
|
my ($hour, $nick, $saying);
|
|
|
|
|
|
|
@@ -384,7 +385,7 @@ sub _parse_file
|
|
|
|
|
|
|
|
# Match *** lines.
|
|
# Match *** lines.
|
|
|
elsif (($hashref = $self->{parser}->thirdline($line, $.)) and $hashref->{nick}) {
|
|
elsif (($hashref = $self->{parser}->thirdline($line, $.)) and $hashref->{nick}) {
|
|
|
- $stats->{totallines}++;
|
|
|
|
|
|
|
+ $stats->{parsedlines}++;
|
|
|
|
|
|
|
|
my ($hour, $min, $nick, $kicker, $newtopic, $newmode, $newjoin);
|
|
my ($hour, $min, $nick, $kicker, $newtopic, $newmode, $newjoin);
|
|
|
my ($newnick);
|
|
my ($newnick);
|
|
@@ -435,6 +436,8 @@ sub _parse_file
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ $stats->{totallines} = $.;
|
|
|
|
|
+
|
|
|
close(LOGFILE);
|
|
close(LOGFILE);
|
|
|
|
|
|
|
|
print "Finished analyzing log, $stats->{days} days total.\n"
|
|
print "Finished analyzing log, $stats->{days} days total.\n"
|