change logging

This commit is contained in:
Asim Aslam 2019-01-22 12:18:33 +00:00
parent 1321782785
commit d8ba18deff
2 changed files with 8 additions and 4 deletions

View File

@ -19,7 +19,6 @@ import (
"time"
"github.com/google/uuid"
"github.com/micro/go-log"
"github.com/micro/go-micro/codec/json"
merr "github.com/micro/go-micro/errors"
"github.com/micro/go-micro/registry"
@ -397,7 +396,6 @@ func (h *httpBroker) Connect() error {
return err
}
log.Logf("Broker Listening on %s", l.Addr().String())
addr := h.address
h.address = l.Addr().String()

View File

@ -438,7 +438,8 @@ func (s *rpcServer) Start() error {
return err
}
log.Logf("Transport Listening on %s", ts.Addr())
log.Logf("Transport [%s] Listening on %s", config.Transport.String(), ts.Addr())
s.Lock()
// swap address
addr := s.opts.Address
@ -493,7 +494,12 @@ func (s *rpcServer) Start() error {
}()
// TODO: subscribe to cruft
return config.Broker.Connect()
if err := config.Broker.Connect(); err != nil {
return err
}
log.Logf("Broker [%s] Listening on %s", config.Broker.String(), config.Broker.Address())
return nil
}
func (s *rpcServer) Stop() error {