From 6385bf743c8006fdfacdba4f681c76b21a409641 Mon Sep 17 00:00:00 2001 From: weisd Date: Wed, 25 Oct 2017 14:23:58 +0800 Subject: [PATCH] add log when register err --- service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/service.go b/service.go index 80373764..e5059d06 100644 --- a/service.go +++ b/service.go @@ -7,6 +7,7 @@ import ( "syscall" "time" + log "github.com/micro/go-log" "github.com/micro/go-micro/client" "github.com/micro/go-micro/cmd" "github.com/micro/go-micro/metadata" @@ -44,7 +45,10 @@ func (s *service) run(exit chan bool) { for { select { case <-t.C: - s.opts.Server.Register() + err := s.opts.Server.Register() + if err != nil { + log.Log("service run Server.Register err : ", err) + } case <-exit: t.Stop() return