diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-03-03 17:41:52 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-03-03 17:41:52 +0800 |
commit | e7030c4bf59e8e148822c50ae1a5896c604c38c1 (patch) | |
tree | 4403290e84761608e8437d23ecef4d934406dd46 /internal/debug/flags.go | |
parent | faf713632c307e3fd77a492481846b858ad991f9 (diff) | |
download | go-tangerine-e7030c4bf59e8e148822c50ae1a5896c604c38c1.tar go-tangerine-e7030c4bf59e8e148822c50ae1a5896c604c38c1.tar.gz go-tangerine-e7030c4bf59e8e148822c50ae1a5896c604c38c1.tar.bz2 go-tangerine-e7030c4bf59e8e148822c50ae1a5896c604c38c1.tar.lz go-tangerine-e7030c4bf59e8e148822c50ae1a5896c604c38c1.tar.xz go-tangerine-e7030c4bf59e8e148822c50ae1a5896c604c38c1.tar.zst go-tangerine-e7030c4bf59e8e148822c50ae1a5896c604c38c1.zip |
all: update light logs (and a few others) to the new model
Diffstat (limited to 'internal/debug/flags.go')
-rw-r--r-- | internal/debug/flags.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/debug/flags.go b/internal/debug/flags.go index f95251939..6247cc7dc 100644 --- a/internal/debug/flags.go +++ b/internal/debug/flags.go @@ -129,8 +129,10 @@ func Setup(ctx *cli.Context) error { if ctx.GlobalBool(pprofFlag.Name) { address := fmt.Sprintf("%s:%d", ctx.GlobalString(pprofAddrFlag.Name), ctx.GlobalInt(pprofPortFlag.Name)) go func() { - log.Info(fmt.Sprintf("starting pprof server at http://%s/debug/pprof", address)) - log.Error(fmt.Sprint(http.ListenAndServe(address, nil))) + log.Info("Starting pprof server", "addr", fmt.Sprintf("http://%s/debug/pprof", address)) + if err := http.ListenAndServe(address, nil); err != nil { + log.Error("Failure in running pprof server", "err", err) + } }() } return nil |