Skip to content
Snippets Groups Projects
Commit ef170b38 authored by haohongfan's avatar haohongfan
Browse files

feat: change %s to %+v

parent 00147a73
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,7 @@ func (dir *BaseDirectory) SetRouters(urls []*common.URL) {
factory := extension.GetRouterFactory(url.Protocol)
r, err := factory.NewRouter(url)
if err != nil {
logger.Errorf("Create router fail. router key: %s, url:%s, error: %s", routerKey, url.Service(), err.Error())
logger.Errorf("Create router fail. router key: %s, url:%s, error: %+v", routerKey, url.Service(), err)
return
}
routers = append(routers, r)
......
......@@ -124,7 +124,7 @@ func (hf *HystrixFilter) Invoke(ctx context.Context, invoker protocol.Invoker, i
_, _, err := hystrix.GetCircuit(cmdName)
configLoadMutex.RUnlock()
if err != nil {
logger.Errorf("[Hystrix Filter]Errors occurred getting circuit for %s , will invoke without hystrix, error is: %s", cmdName, err.Error())
logger.Errorf("[Hystrix Filter]Errors occurred getting circuit for %s , will invoke without hystrix, error is: %+v", cmdName, err)
return invoker.Invoke(ctx, invocation)
}
logger.Infof("[Hystrix Filter]Using hystrix filter: %s", cmdName)
......
......@@ -68,9 +68,9 @@ func (s *KubernetesRegistryTestSuite) TestSubscribe() {
time.Sleep(1e9)
go func() {
err = r.Register(url)
if err != nil {
t.Fatal(err)
registerErr := r.Register(url)
if registerErr != nil {
t.Fatal(registerErr)
}
}()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment