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 (
|
2019-12-17 20:24:01 +03:00
|
|
|
"errors"
|
|
|
|
|
2019-12-17 15:11:26 +03:00
|
|
|
"github.com/micro/go-micro/debug/log"
|
|
|
|
)
|
|
|
|
|
|
|
|
type klog struct{}
|
|
|
|
|
2019-12-17 20:24:01 +03:00
|
|
|
func (k *klog) Read(...log.ReadOption) ([]log.Record, error) {
|
|
|
|
return nil, errors.New("not implemented")
|
|
|
|
}
|
2019-12-17 15:11:26 +03:00
|
|
|
|
2019-12-17 20:24:01 +03:00
|
|
|
func (k *klog) Write(l log.Record) error {
|
|
|
|
return write(l)
|
2019-12-17 19:09:51 +03:00
|
|
|
}
|
2019-12-17 15:11:26 +03:00
|
|
|
|
2019-12-17 20:24:01 +03:00
|
|
|
func (k *klog) Stream() (log.Stream, error) {
|
|
|
|
return &klogStreamer{}, nil
|
2019-12-17 15:11:26 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// New returns a configured Kubernetes logger
|
|
|
|
func New() log.Log {
|
|
|
|
return &klog{}
|
|
|
|
}
|