transfering over some manual changes
@@ -85,7 +85,7 @@ type WagClient struct {
// Keep the circuit doer around so that we can turn it on / off
circuitDoer *circuitBreakerDoer
defaultTimeout time.Duration
- logger waglogger.WagClientLogger
+ logger WagClientLogger
}
var _ Client = (*WagClient)(nil)
@@ -94,7 +94,7 @@ var _ Client = (*WagClient)(nil)
//This pattern is used instead of using closures for greater transparency and the ability to implement additional interfaces.
type options struct {
transport http.RoundTripper
- logger waglogger.WagClientLogger
+ logger WagClientLogger
instrumentor Instrumentor
exporter sdktrace.SpanExporter
}
@@ -105,12 +105,12 @@ type Option interface {
//WithLogger sets client logger option.
-func WithLogger(log waglogger.WagClientLogger) Option {
+func WithLogger(log WagClientLogger) Option {
return loggerOption{Log: log}
}
type loggerOption struct {
- Log waglogger.WagClientLogger
+ Log WagClientLogger
}
func (l loggerOption) apply(opts *options) {
@@ -281,7 +281,7 @@ func determineSampling() (samplingProbability float64, err error) {
func New(basePath string, opts ...Option) *WagClient {
defaultTransport := http.DefaultTransport
- defaultLogger := printlogger.NewLogger("{{.ServiceName}}-wagclient", "info")
+ defaultLogger := NewLogger("{{.ServiceName}}-wagclient", "info")
defaultExporter, err := stdouttrace.New(stdouttrace.WithPrettyPrint())
if err != nil {
fmt.Println(err)
@@ -360,7 +360,7 @@ func (c *WagClient) SetCircuitBreakerDebug(b bool) {
}
// SetLogger allows for setting a custom logger
-func (c *WagClient) SetLogger(l waglogger.WagClientLogger) {
+func (c *WagClient) SetLogger(l WagClientLogger) {
c.logger = l
c.circuitDoer.logger = l
}
