Add logger setter to listener

This commit is contained in:
Kevin Cotugno 2017-09-24 22:16:16 -07:00
parent 406fb75d56
commit c5d82fab11
2 changed files with 5 additions and 0 deletions

View File

@ -69,6 +69,10 @@ func (s *ListenerService) Error() <-chan error {
return s.err return s.err
} }
func (s *ListenerService) SetLogger(logger tacitus.Logger) {
s.Logger = logger
}
func (s *ListenerService) listen() { func (s *ListenerService) listen() {
go func() { go func() {
for msg := range s.Client.Stream() { for msg := range s.Client.Stream() {

View File

@ -6,4 +6,5 @@ type ListenerService interface {
Subscribe(product string) Subscribe(product string)
Stream() <-chan Trade Stream() <-chan Trade
Error() <-chan error Error() <-chan error
SetLogger(logger Logger)
} }