log_queue.go 624 B

1234567891011121314151617181920212223242526272829
  1. package kafka
  2. import (
  3. "github.com/seaweedfs/seaweedfs/weed/glog"
  4. "github.com/seaweedfs/seaweedfs/weed/notification"
  5. "github.com/seaweedfs/seaweedfs/weed/util"
  6. "google.golang.org/protobuf/proto"
  7. )
  8. func init() {
  9. notification.MessageQueues = append(notification.MessageQueues, &LogQueue{})
  10. }
  11. type LogQueue struct {
  12. }
  13. func (k *LogQueue) GetName() string {
  14. return "log"
  15. }
  16. func (k *LogQueue) Initialize(configuration util.Configuration, prefix string) (err error) {
  17. return nil
  18. }
  19. func (k *LogQueue) SendMessage(key string, message proto.Message) (err error) {
  20. glog.V(0).Infof("%v: %+v", key, message)
  21. return nil
  22. }