log_queue.go 622 B

1234567891011121314151617181920212223242526272829
  1. package kafka
  2. import (
  3. "github.com/chrislusf/seaweedfs/weed/util/log"
  4. "github.com/chrislusf/seaweedfs/weed/notification"
  5. "github.com/chrislusf/seaweedfs/weed/util"
  6. "github.com/golang/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. log.Infof("%v: %+v", key, message)
  21. return nil
  22. }