From 29cccd0b4ab6132f1a738ec63ddd35bf9c8e2659 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Thu, 9 Apr 2020 14:10:17 +0100 Subject: [PATCH] minor tweak add log line to proxy and basic auth provider by default (#1513) --- auth/default.go | 13 ++++++++++++- proxy/mucp/mucp.go | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/auth/default.go b/auth/default.go index 358cf099..b9160a50 100644 --- a/auth/default.go +++ b/auth/default.go @@ -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 { diff --git a/proxy/mucp/mucp.go b/proxy/mucp/mucp.go index da901c13..e7c69aa2 100644 --- a/proxy/mucp/mucp.go +++ b/proxy/mucp/mucp.go @@ -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 }