Skip to content

Commit

Permalink
cmd/zoekt: suppress logging if -v is missing (#869)
Browse files Browse the repository at this point in the history
The logging is neat for debugging, but is distracting when using
cmd/zoekt as a grep replacement.
  • Loading branch information
hanwen-flow authored Nov 28, 2024
1 parent db940cf commit dadf09d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/zoekt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ func main() {
}
pat := flag.Arg(0)

if !*verbose {
log.SetOutput(io.Discard)
}

var searcher zoekt.Searcher
var err error
if *shard != "" {
Expand Down

0 comments on commit dadf09d

Please sign in to comment.