Переглянути джерело

Hint user to use a log with timestamps when no parseable lines are found

Christoph Berg 21 роки тому
батько
коміт
22ece45e5f
2 змінених файлів з 7 додано та 2 видалено
  1. 1 0
      docs/Changelog
  2. 6 2
      modules/Pisg.pm

+ 1 - 0
docs/Changelog

@@ -15,6 +15,7 @@ pisg (0.63) - ??
    * Links for users in "These didn't make it to the top" (thanks, Edward
    * Links for users in "These didn't make it to the top" (thanks, Edward
      Pinski).
      Pinski).
    * irssi.pm: Recognize joins even when autorealname.pl is loaded.
    * irssi.pm: Recognize joins even when autorealname.pl is loaded.
+   * Hint user to use a log with timestamps when no parseable lines are found.
 
 
 pisg (0.62) - Sat Dec, 11th 2004
 pisg (0.62) - Sat Dec, 11th 2004
    Changes by Christoph Berg:
    Changes by Christoph Berg:

+ 6 - 2
modules/Pisg.pm

@@ -481,8 +481,12 @@ _END
         if (defined $stats) {
         if (defined $stats) {
             if ($stats->{parsedlines} > 0) {
             if ($stats->{parsedlines} > 0) {
                 $generator->create_output();
                 $generator->create_output();
-            } elsif ($stats->{parsedlines} == 0) {
-                print STDERR "No parseable lines found in logfile ($stats->{totallines} total lines). Skipping.\nYou might be using the wrong format.\n";
+            } else {
+                print STDERR <<_END unless $self->{cfg}->{silent};
+No parseable lines found in logfile ($stats->{totallines} total lines). Skipping.
+-> You might be using the wrong format.
+-> A common error is that the logs do not contain timestamps for each line.
+_END
             }
             }
         }
         }