فهرست منبع

Update Logfile.pm

Added .xz extension support, thanks to Unit 193.
Xenthys 10 سال پیش
والد
کامیت
631ea2e43c
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  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) {
         open (LOGFILE, "gunzip -c $file |") or
         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 {
         open (LOGFILE, $file) or
         die("$0: Unable to open logfile($file): $!\n");