aboutsummaryrefslogtreecommitdiffstats
path: root/internal/debug/api.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-03-03 17:41:52 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-03-03 17:41:52 +0800
commite7030c4bf59e8e148822c50ae1a5896c604c38c1 (patch)
tree4403290e84761608e8437d23ecef4d934406dd46 /internal/debug/api.go
parentfaf713632c307e3fd77a492481846b858ad991f9 (diff)
downloadgo-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/api.go')
-rw-r--r--internal/debug/api.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/debug/api.go b/internal/debug/api.go
index 01126b41b..8b7693f6a 100644
--- a/internal/debug/api.go
+++ b/internal/debug/api.go
@@ -22,7 +22,6 @@ package debug
import (
"errors"
- "fmt"
"io"
"os"
"os/user"
@@ -111,7 +110,7 @@ func (h *HandlerT) StartCPUProfile(file string) error {
}
h.cpuW = f
h.cpuFile = file
- log.Info(fmt.Sprint("CPU profiling started, writing to", h.cpuFile))
+ log.Info("CPU profiling started", "dump", h.cpuFile)
return nil
}
@@ -123,7 +122,7 @@ func (h *HandlerT) StopCPUProfile() error {
if h.cpuW == nil {
return errors.New("CPU profiling not in progress")
}
- log.Info(fmt.Sprint("done writing CPU profile to", h.cpuFile))
+ log.Info("Done writing CPU profile", "dump", h.cpuFile)
h.cpuW.Close()
h.cpuW = nil
h.cpuFile = ""
@@ -179,7 +178,7 @@ func (*HandlerT) Stacks() string {
func writeProfile(name, file string) error {
p := pprof.Lookup(name)
- log.Info(fmt.Sprintf("writing %d %s profile records to %s", p.Count(), name, file))
+ log.Info("Writing profile records", "count", p.Count(), "type", name, "dump", file)
f, err := os.Create(expandHome(file))
if err != nil {
return err