fixed printlogger dep go.mod
MODIFY
go.mod
go.mod
@@ -4,6 +4,7 @@ go 1.16
require (
github.com/Clever/go-utils v0.0.0-20180917210021-2dac0ec6f2ac
+ github.com/Clever/wag/loggers/printlogger v0.0.0-20220627165618-1bd4f73bc4d8 // indirect
github.com/Clever/wag/loggers/waglogger v0.0.0-20220627165333-1da7fb040613 // indirect
github.com/awslabs/goformation/v2 v2.3.1
github.com/go-openapi/errors v0.19.4

MODIFY
go.sum
go.sum
@@ -3,6 +3,8 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Clever/go-utils v0.0.0-20180917210021-2dac0ec6f2ac h1:eoofDGlVjiTro1kr97QnRkW4b/MGDSmm4E0ta2rqFos=
github.com/Clever/go-utils v0.0.0-20180917210021-2dac0ec6f2ac/go.mod h1:XXTA9F/953CGhnDRslFaBp7S0560745gMZSDm+C4ebw=
+github.com/Clever/wag/loggers/printlogger v0.0.0-20220627165618-1bd4f73bc4d8 h1:QCFuEtQTXXPxVXpdzD9ZsSvsb7pg2vSPnbW86ljur40=
+github.com/Clever/wag/loggers/printlogger v0.0.0-20220627165618-1bd4f73bc4d8/go.mod h1:KkPJFcnprzj2UNUue87W5+LrjaRMt00jEoKav0RWh20=
github.com/Clever/wag/loggers/waglogger v0.0.0-20220627165333-1da7fb040613 h1:qd6x0QWFZ+6mYJ/n2eOdlHR5lfz1WKC0eR4IeYgn8Z4=
github.com/Clever/wag/loggers/waglogger v0.0.0-20220627165333-1da7fb040613/go.mod h1:wCYwOynv1y5ePqwkSdVcjrO6AZn99vCixp6NDqO6QFQ=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=

MODIFY
loggers/printlogger/go.mod
loggers/printlogger/go.mod
module github.com/Clever/wag/loggers/printlogger
go 1.16
+
+require github.com/Clever/wag/loggers/waglogger v0.0.0-20220627165618-1bd4f73bc4d8 // indirect

ADD
loggers/printlogger/go.sum
+github.com/Clever/wag/loggers/waglogger v0.0.0-20220627165618-1bd4f73bc4d8 h1:teoGIApJ4Xh4gRXJ2FhavOfB5PcBxkBKSCW0X1+FEBQ=
+github.com/Clever/wag/loggers/waglogger v0.0.0-20220627165618-1bd4f73bc4d8/go.mod h1:wCYwOynv1y5ePqwkSdVcjrO6AZn99vCixp6NDqO6QFQ=

MODIFY
samples/gen-go/client/client.go
samples/gen-go/client/client.go
@@ -14,7 +14,8 @@ import (
"time"
discovery "github.com/Clever/discovery-go"
- "github.com/Clever/wag/logger"
+ "github.com/Clever/wag/loggers/printlogger"
+ "github.com/Clever/wag/loggers/waglogger"
"github.com/Clever/wag/samples/v8/gen-go/models"
"github.com/afex/hystrix-go/hystrix"
)
@@ -52,13 +53,16 @@ type WagClient struct {
var _ Client = (*WagClient)(nil)
// New creates a new client. The base path and http transport are configurable.
-func New(basePath string) *WagClient {
+func New(basePath string, opts ...Option) *WagClient {
basePath = strings.TrimSuffix(basePath, "/")
base := baseDoer{}
// For the short-term don't use the default retry policy since its 5 retries can 5X
// the traffic. Once we've enabled circuit breakers by default we can turn it on.
retry := retryDoer{d: base, retryPolicy: SingleRetryPolicy{}}
- logger := NewLogger("swagger-test-wagclient", 3)
+ options := options{
+ cache: defaultCache,
+ logger: printlogger.NewLogger("swagger-test-wagclient", 3),
+ }
circuit := &circuitBreakerDoer{
d: &retry,
// TODO: INFRANG-4404 allow passing circuitBreakerOptions

fixed printlogger dep go.mod