Skip to content

Commit

Permalink
we have a command line util
Browse files Browse the repository at this point in the history
  • Loading branch information
smn committed Jul 19, 2015
1 parent c86ad42 commit 9289c06
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion logdriver.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
package main

import (
"flag"
"fmt"

"github.com/ActiveState/tail"
)

func main() {

var filename string
config := tail.Config{Follow: true}

flag.StringVar(&filename, "filename", "", "The file to tail.")
flag.StringVar(&filename, "F", "", " (shorthand for -filename)")
flag.Parse()

done := make(chan bool)
go tailFile("foo.txt", config, done)
go tailFile(filename, config, done)
<-done
}

Expand Down

0 comments on commit 9289c06

Please sign in to comment.