Skip to content

Commit

Permalink
log: do not add stack to error log (#1532)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolouch authored and disksing committed May 9, 2019
1 parent 4573d20 commit 474535e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import (
"go.etcd.io/etcd/embed"
"go.etcd.io/etcd/pkg/transport"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)

// Config is the pd server configuration.
Expand Down Expand Up @@ -804,7 +805,7 @@ func ParseUrls(s string) ([]url.URL, error) {

// SetupLogger setup the logger.
func (c *Config) SetupLogger() error {
lg, p, err := log.InitLogger(&c.Log)
lg, p, err := log.InitLogger(&c.Log, zap.AddStacktrace(zapcore.FatalLevel))
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion server/region_syncer/history_buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (h *historyBuffer) get(index uint64) *core.RegionInfo {
func (h *historyBuffer) reload() {
v, err := h.kv.Load(historyKey)
if err != nil {
log.Warn("load history index failed", zap.Error(err))
log.Warn("load history index failed", zap.String("error", err.Error()))
}
if v != "" {
h.index, err = strconv.ParseUint(v, 10, 64)
Expand Down

0 comments on commit 474535e

Please sign in to comment.