micro/debug/log/kubernetes/kubernetes.go

26 lines
517 B
Go
Raw Normal View History

2019-12-17 15:11:26 +03:00
// Package kubernetes is a logger implementing (github.com/micro/go-micro/debug/log).Log
package kubernetes
import (
"github.com/micro/go-micro/debug/log"
)
type klog struct{}
func (k *klog) Read(...log.ReadOption) []log.Record { return nil }
func (k *klog) Write(l log.Record) {
write(l)
}
2019-12-17 15:11:26 +03:00
2019-12-17 19:27:17 +03:00
func (k *klog) Stream() (<-chan log.Record, chan bool) {
c, s := make(chan log.Record), make(chan bool)
2019-12-17 15:11:26 +03:00
go close(c)
2019-12-17 19:27:17 +03:00
return c, s
2019-12-17 15:11:26 +03:00
}
// New returns a configured Kubernetes logger
func New() log.Log {
return &klog{}
}