We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae205b3 commit c05eab0Copy full SHA for c05eab0
cmd/client/main.go
@@ -41,13 +41,26 @@ func main() {
41
if err != nil {
42
log.Fatalf("client.TodoList failed: %v", err)
43
}
44
- log.Infow("Task",
45
- "Title", tr.Task.Title,
46
- "Description", tr.Task.Description,
47
- "Completed", tr.Task.Completed,
48
- "Last Updated", tr.Task.LastUpdated.AsTime().Format(time.RFC850),
49
- "Partition", tr.Partition,
50
- "Offset", tr.Offset,
51
- )
+
+ if errs := tr.GetErrors(); errs != nil {
+ log.Errorln("Errors fetching:")
+ for _, e := range errs.Error {
+ log.Errorw("Error Details",
+ "Topic", e.Topic,
+ "Partition", e.Partition,
+ "Error", e.Message,
52
+ )
53
+ }
54
+ } else {
55
+ todo := tr.GetTodo()
56
+ log.Infow("Task",
57
+ "Title", todo.Task.Title,
58
+ "Description", todo.Task.Description,
59
+ "Completed", todo.Task.Completed,
60
+ "Last Updated", todo.Task.LastUpdated.AsTime().Format(time.RFC850),
61
+ "Partition", todo.Partition,
62
+ "Offset", todo.Offset,
63
64
65
66
0 commit comments