From c5d82fab115a777f50f5cafdbd34c2ee452ecf63 Mon Sep 17 00:00:00 2001 From: Kevin Cotugno Date: Sun, 24 Sep 2017 22:16:16 -0700 Subject: [PATCH] Add logger setter to listener --- gdax/listener_service.go | 4 ++++ listener.go | 1 + 2 files changed, 5 insertions(+) diff --git a/gdax/listener_service.go b/gdax/listener_service.go index 9053769..29262ca 100644 --- a/gdax/listener_service.go +++ b/gdax/listener_service.go @@ -69,6 +69,10 @@ func (s *ListenerService) Error() <-chan error { return s.err } +func (s *ListenerService) SetLogger(logger tacitus.Logger) { + s.Logger = logger +} + func (s *ListenerService) listen() { go func() { for msg := range s.Client.Stream() { diff --git a/listener.go b/listener.go index 9f9391f..b2bdb55 100644 --- a/listener.go +++ b/listener.go @@ -6,4 +6,5 @@ type ListenerService interface { Subscribe(product string) Stream() <-chan Trade Error() <-chan error + SetLogger(logger Logger) }