Move logger

This commit is contained in:
Asim Aslam
2019-12-17 18:16:45 +00:00
parent 812fe9e640
commit c2d59c1f4d
5 changed files with 132 additions and 29 deletions

View File

@@ -0,0 +1,24 @@
package memory
import (
"github.com/micro/go-micro/debug/log"
)
type logStream struct {
stream <-chan log.Record
stop chan bool
}
func (l *logStream) Chan() <-chan log.Record {
return l.stream
}
func (l *logStream) Stop() error {
select {
case <-l.stop:
return nil
default:
close(l.stop)
}
return nil
}