diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -5,6 +5,7 @@ import ( "fmt" "github.com/golang/protobuf/proto" "github.com/ry/v8worker2" + "io/ioutil" "log" "os" "runtime/pprof" @@ -34,6 +35,11 @@ func main() { } args = v8worker2.SetFlags(args) + // Unless the debug flag is specified, discard logs. + if !*flagDebug { + log.SetOutput(ioutil.Discard) + } + // Maybe start Golang CPU profiler. // Use --prof for profiling JS. if *flagGoProf != "" { |