minor tweak add log line to proxy and basic auth provider by default (#1513)

This commit is contained in:
Asim Aslam 2020-04-09 14:10:17 +01:00 committed by GitHub
parent bf65dc71c7
commit 29cccd0b4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package auth
import (
"github.com/google/uuid"
"github.com/micro/go-micro/v2/auth/provider/basic"
)
var (
@ -9,7 +10,17 @@ var (
)
func NewAuth(opts ...Option) Auth {
return &noop{}
options := Options{
Provider: basic.NewProvider(),
}
for _, o := range opts {
o(&options)
}
return &noop{
opts: options,
}
}
type noop struct {

View File

@ -206,7 +206,7 @@ func (p *Proxy) cacheRoutes(service string) ([]router.Route, error) {
results, err := p.Router.Lookup(router.QueryService(service))
if err != nil {
// assumption that we're ok with stale routes
logger.Debugf("Failed to lookup route for %s: %v", service, err)
// otherwise return the error
return nil, err
}