Skip to content

Commit

Permalink
chore: log error
Browse files Browse the repository at this point in the history
  • Loading branch information
huantt committed Dec 4, 2023
1 parent e21ca47 commit 34b351a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/huantt/kafka-dump/pkg/kafka_utils"
"github.com/huantt/kafka-dump/pkg/log"
"github.com/spf13/cobra"
"log/slog"
"time"
)

Expand Down Expand Up @@ -85,7 +86,8 @@ func CreateStreamCmd() (*cobra.Command, error) {
)
transferredCount, err := streamer.Run()
if err != nil {
panic(err)
slog.Error(err.Error())
return
}
log.Infof("Transferred %d messages from %s to %s", transferredCount, fromTopic, toTopic)
},
Expand Down

0 comments on commit 34b351a

Please sign in to comment.