Add logger setter to listener
This commit is contained in:
parent
406fb75d56
commit
c5d82fab11
@ -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() {
|
||||
|
@ -6,4 +6,5 @@ type ListenerService interface {
|
||||
Subscribe(product string)
|
||||
Stream() <-chan Trade
|
||||
Error() <-chan error
|
||||
SetLogger(logger Logger)
|
||||
}
|
||||
|
Reference in New Issue
Block a user