aboutsummaryrefslogtreecommitdiffstats
path: root/skate/cmd/skate-reduce
diff options
context:
space:
mode:
Diffstat (limited to 'skate/cmd/skate-reduce')
-rw-r--r--skate/cmd/skate-reduce/main.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/skate/cmd/skate-reduce/main.go b/skate/cmd/skate-reduce/main.go
index 6c69121..eb84e38 100644
--- a/skate/cmd/skate-reduce/main.go
+++ b/skate/cmd/skate-reduce/main.go
@@ -55,6 +55,7 @@ var (
batchSize = flag.Int("b", 10000, "batch size")
mode = flag.String("m", "ref", "mode, e.g. exact, verify, ref, bref, wiki")
quite = flag.Bool("q", false, "be quite")
+ logFile = flag.String("log", "", "log filename")
// Possible inputs -- we could switch to a subcommand cli parser?
refs = flag.String("F", "", "path to refs input")
@@ -74,6 +75,14 @@ var (
func main() {
flag.Parse()
+ if *logFile != "" {
+ f, err := os.OpenFile(*logFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
+ if err != nil {
+ log.Fatal(err)
+ }
+ defer f.Close()
+ log.SetOutput(f)
+ }
if *quite {
log.SetOutput(ioutil.Discard)
}