diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-05-25 12:25:55 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-05-25 12:25:55 -0400 |
commit | 08e005d45f475a8b45d18ca887dbf790e93bc1db (patch) | |
tree | 7455661d2aac0d54f3ceccc00e2cb080b0135911 /main.go | |
parent | 5353e9e90f3cdc090acec6b81c90e803ef22dcda (diff) |
Improve debug logging in golang
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -3,8 +3,6 @@ package main import ( "flag" "github.com/ry/v8worker2" - "io/ioutil" - "log" "os" "runtime/pprof" ) @@ -28,10 +26,6 @@ func FlagsParse() []string { } args = v8worker2.SetFlags(args) - // Unless the debug flag is specified, discard logs. - if !*flagDebug { - log.SetOutput(ioutil.Discard) - } return args } @@ -43,7 +37,7 @@ func main() { if *flagGoProf != "" { f, err := os.Create(*flagGoProf) if err != nil { - log.Fatal(err) + panic(err) } pprof.StartCPUProfile(f) defer pprof.StopCPUProfile() |