Disable internal standard library logger

dev
mzack 2022-02-01 14:46:40 +01:00
parent 1bbcdd30dc
commit 5889a39fb4
1 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,8 @@ package runner
import ( import (
"bufio" "bufio"
"io"
"log"
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
@ -161,6 +163,10 @@ func configureOutput(options *types.Options) {
if options.Silent { if options.Silent {
gologger.DefaultLogger.SetMaxLevel(levels.LevelSilent) gologger.DefaultLogger.SetMaxLevel(levels.LevelSilent)
} }
// disable standard logger (ref: https://github.com/golang/go/issues/19895)
log.SetFlags(0)
log.SetOutput(io.Discard)
} }
// loadResolvers loads resolvers from both user provided flag and file // loadResolvers loads resolvers from both user provided flag and file