diff options
Diffstat (limited to 'skate/cmd/skate-reduce')
-rw-r--r-- | skate/cmd/skate-reduce/main.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/skate/cmd/skate-reduce/main.go b/skate/cmd/skate-reduce/main.go index 74da648..3130a22 100644 --- a/skate/cmd/skate-reduce/main.go +++ b/skate/cmd/skate-reduce/main.go @@ -68,6 +68,7 @@ import ( "git.archive.org/martin/cgraph/skate" "git.archive.org/martin/cgraph/skate/parallel" "git.archive.org/martin/cgraph/skate/xio" + gzip "github.com/klauspost/compress/gzip" ) var ( @@ -75,7 +76,7 @@ var ( batchSize = flag.Int("b", 10000, "batch size") mode = flag.String("m", "ref", "mode, e.g. exact, fuzzy, ref, bref, wiki, oled, oledt, unmatched") quite = flag.Bool("q", false, "be quite") - logFile = flag.String("log", "", "log filename (stderr, if empty)") + logFile = flag.String("log", "", "log filename (stderr, if empty; logfile will be gzip compressed)") // Possible inputs -- we could switch to a subcommand cli parser? bref = flag.String("B", "", "path to bref file") @@ -103,8 +104,10 @@ func main() { if err != nil { log.Fatal(err) } + gzw := gzip.NewWriter(f) + defer gzw.Flush() defer f.Close() - log.SetOutput(f) + log.SetOutput(gzw) } if *quite { log.SetOutput(ioutil.Discard) |