1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-05-02 01:27:55 +02:00
seaweedfs/weed/notification/log/log_queue.go
Chris Lu 6c9156b25f switch to logrus
losing filename and line number. Critical for debugging.
2020-11-16 22:26:58 -08:00

30 lines
622 B
Go

package kafka
import (
"github.com/chrislusf/seaweedfs/weed/util/log"
"github.com/chrislusf/seaweedfs/weed/notification"
"github.com/chrislusf/seaweedfs/weed/util"
"github.com/golang/protobuf/proto"
)
func init() {
notification.MessageQueues = append(notification.MessageQueues, &LogQueue{})
}
type LogQueue struct {
}
func (k *LogQueue) GetName() string {
return "log"
}
func (k *LogQueue) Initialize(configuration util.Configuration, prefix string) (err error) {
return nil
}
func (k *LogQueue) SendMessage(key string, message proto.Message) (err error) {
log.Infof("%v: %+v", key, message)
return nil
}