Skip to content

Commit

Permalink
Remove extra logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed Jan 16, 2020
1 parent a7b8697 commit 94924dd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,20 @@ func main() {
args := flag.Args()

if args[0] == "follow" {
fmt.Printf("Consuming logs from/to %s\n", *streamUrl)
fmt.Printf("Streaming logs...")
consumer, err := NewConsumer(redisUrl, streamKey)
if err != nil {
fmt.Printf("Err: %v\n", err)
os.Exit(1)
}

bytes, err := io.Copy(os.Stdout, consumer)
_, err = io.Copy(os.Stdout, consumer)
if err != nil {
fmt.Printf("Err: %v\n", err)
os.Exit(1)
}
fmt.Printf("Read %d bytes\n", bytes)
} else if args[0] == "run" {
fmt.Printf("Sending logs to %s\n", *streamUrl)
fmt.Printf("Streaming logs..")
producer, err := NewProducer(redisUrl, streamKey)
if err != nil {
fmt.Printf("Err: %v\n", err)
Expand Down

0 comments on commit 94924dd

Please sign in to comment.