diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-09-19 22:31:45 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-09-19 22:31:45 -0700 |
| commit | d5149e592e88058529dcee0133bfe6d5fe48617d (patch) | |
| tree | d564e8a48721f0926152af6749977da21c140d24 | |
| parent | d9b32db8d7c81f2bbf10499098220a81b846d24a (diff) | |
| download | seaweedfs-d5149e592e88058529dcee0133bfe6d5fe48617d.tar.xz seaweedfs-d5149e592e88058529dcee0133bfe6d5fe48617d.zip | |
add logging on kafka reading
| -rw-r--r-- | weed/command/filer_replication.go | 1 | ||||
| -rw-r--r-- | weed/replication/notification_kafka.go | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/weed/command/filer_replication.go b/weed/command/filer_replication.go index 5fef89fc8..967577c72 100644 --- a/weed/command/filer_replication.go +++ b/weed/command/filer_replication.go @@ -52,6 +52,7 @@ func runFilerReplicate(cmd *Command, args []string) bool { glog.Errorf("receive %s: %+v", key, err) continue } + glog.V(1).Infof("processing file: %s", key) if err = replicator.Replicate(key, m); err != nil { glog.Errorf("replicate %s: %+v", key, err) } diff --git a/weed/replication/notification_kafka.go b/weed/replication/notification_kafka.go index ce3b86ae9..aaf08a96c 100644 --- a/weed/replication/notification_kafka.go +++ b/weed/replication/notification_kafka.go @@ -37,6 +37,12 @@ func (k *KafkaInput) initialize(hosts []string, topic string) (err error) { config := sarama.NewConfig() config.Consumer.Return.Errors = true k.consumer, err = sarama.NewConsumer(hosts, config) + if err != nil { + panic(err) + } else { + glog.V(0).Infof("connected to %v", hosts) + } + k.topic = topic k.messageChan = make(chan *sarama.ConsumerMessage, 1) |
