Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Commit

Permalink
Added extra logs for testing purposes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanguranda committed Nov 21, 2017
1 parent f762d97 commit 2e3c6b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions producer/contentProducer.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ func (p *defaultContentProducer) sendSingleMessage(tid string, uuid string, cont
if err != nil {
logEntry.Warnf("Unable to send message to Kafka. Reason: %v", err)
}

log.Infof("Message with tid=%v. Message sent for content with uuid:%v", tid, content["uuid"])
}

func extractUuid(content map[string]interface{}) (string, error) {
Expand Down
3 changes: 3 additions & 0 deletions unfolder.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ func (u *unfolder) handle(writer http.ResponseWriter, req *http.Request) {
writeError(writer, http.StatusInternalServerError, err)
return
}
log.Infof("Message with tid=%v, contentCollectionUuid=%v, collectionType=%v. Resolved relations, contains:%v, contained in:%v", tid, uuid, collectionType, oldCollectionRelations.Contains, oldCollectionRelations.ContainedIn)

diffUuidsMap := u.collectionsDiffer.Diff(uuidsAndDate.UuidArr, oldCollectionRelations.Contains)
log.Infof("Message with tid=%v, contentCollectionUuid=%v, collectionType=%v. Diff uuids:%v", tid, uuid, collectionType, diffUuidsMap)

fwResp, err := u.forwarder.Forward(tid, uuid, collectionType, body)
if err != nil {
Expand Down Expand Up @@ -127,6 +129,7 @@ func (u *unfolder) handle(writer http.ResponseWriter, req *http.Request) {
writeError(writer, http.StatusInternalServerError, err)
return
}
log.Infof("Message with tid=%v, contentCollectionUuid=%v, collectionType=%v. Resolved content:%v", tid, uuid, collectionType, resolvedContentArr)

u.producer.Send(tid, uuidsAndDate.LastModified, resolvedContentArr, diffUuidsMap)
}
Expand Down

0 comments on commit 2e3c6b7

Please sign in to comment.