2019-12-18 16:12:25 +00:00
|
|
|
package noop
|
|
|
|
|
|
|
|
import (
|
2020-08-19 17:47:17 +03:00
|
|
|
"github.com/unistack-org/micro/v3/debug/log"
|
2019-12-18 16:12:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type noop struct{}
|
|
|
|
|
|
|
|
func (n *noop) Read(...log.ReadOption) ([]log.Record, error) {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (n *noop) Write(log.Record) error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (n *noop) Stream() (log.Stream, error) {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewLog(opts ...log.Option) log.Log {
|
|
|
|
return new(noop)
|
|
|
|
}
|