Kaynağa Gözat

+ Complain if CacheDir does not exist.
+ Note that caching does not work for "one big logfile" setups.

Christoph Berg 21 yıl önce
ebeveyn
işleme
7abbf2246a
3 değiştirilmiş dosya ile 16 ekleme ve 1 silme
  1. 6 0
      docs/Changelog
  2. 5 1
      docs/pisg-doc.xml
  3. 5 0
      modules/Pisg/Parser/Logfile.pm

+ 6 - 0
docs/Changelog

@@ -1,3 +1,9 @@
+pisg (0.66) - ??
+   Christoph:
+   * Cache:
+     + Complain if CacheDir does not exist.
+     + Note that caching does not work for "one big logfile" setups.
+
 pisg (0.65) - Fri Apr, 15th 2005
    Christoph:
    * Karma didn't work well with nick aliases. It's still far from perfect,

+ 5 - 1
docs/pisg-doc.xml

@@ -1065,8 +1065,12 @@
     Setting this option makes pisg dump the results of log parsing into cache
     files. The next time pisg is run, it compares the timestamp of the log(s)
     with the timestamp stored in the cache file. When the log was not changed,
-    the cached data is used.
+    the cached data is used. (This means that it does not work if you only
+    have a single big logfile. Split the log at arbitrary points and use
+    <xref linkend="LogDir" /> or <xref linkend="Logfile" />="dir/*".)
+    </para>
 
+    <para>
     Note that the cache files should be deleted when the pisg config file is
     changed since the cache data uses the old config settings.
     <xref linkend="NickTracking" /> does not work especially well with the

+ 5 - 0
modules/Pisg/Parser/Logfile.pm

@@ -124,6 +124,11 @@ sub analyze
         day_times => [ undef ],
     );
 
+    if ($self->{cfg}->{cachedir} and not -d $self->{cfg}->{cachedir}) {
+        print STDERR "CacheDir \"$self->{cfg}->{cachedir}\" not found. Skipping caching.\n";
+        delete $self->{cfg}->{cachedir};
+    }
+
     foreach my $logfile (@logfiles) {
         # Run through the logfile
         print "Analyzing log $logfile... " unless ($self->{cfg}->{silent});