Kaynağa Gözat

Update Logfile.pm

Added .xz extension support, thanks to Unit 193.
Xenthys 10 yıl önce
ebeveyn
işleme
631ea2e43c
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 3 0
      modules/Pisg/Parser/Logfile.pm

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

@@ -292,6 +292,9 @@ sub _parse_file
     } elsif ($file =~ /.gz$/ && -f $file) {
     } elsif ($file =~ /.gz$/ && -f $file) {
         open (LOGFILE, "gunzip -c $file |") or
         open (LOGFILE, "gunzip -c $file |") or
         die("$0: Unable to open logfile($file): $!\n");
         die("$0: Unable to open logfile($file): $!\n");
+    } elsif ($file =~ /.xz$/ && -f $file) {
+        open (LOGFILE, "unxz -c $file |") or
+        die("$0: Unable to open logfile($file): $!\n");
     } else {
     } else {
         open (LOGFILE, $file) or
         open (LOGFILE, $file) or
         die("$0: Unable to open logfile($file): $!\n");
         die("$0: Unable to open logfile($file): $!\n");