Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed Oct 3, 2020
1 parent 6934784 commit 9ad6f4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ func (s *Subscription) SetTriggering(triggeringItemID uint32, add, remove []uint

// republish executes a synchronous republish request.
func (s *Subscription) republish(req *ua.RepublishRequest) (*ua.RepublishResponse, error) {
log.Println("RepublishRequest:", toJSON(req))
log.Printf("sub %d: publish: RepublishRequest: %s", s.SubscriptionID, toJSON(req))
var res *ua.RepublishResponse
err := s.c.sechan.SendRequest(req, s.c.Session().resp.AuthenticationToken, func(v interface{}) error {
return safeAssign(v, &res)
})
log.Println("RepublishResponse:", toJSON(res))
log.Printf("sub %d: publish: RepublishResponse: %s", s.SubscriptionID, toJSON(res))
return res, err
}

Expand All @@ -217,12 +217,12 @@ func (s *Subscription) sendPublishRequest() (*ua.PublishResponse, error) {
}
s.pendingAcksMux.RUnlock()

log.Println("PublishRequest:", toJSON(req))
log.Printf("sub %d: publish: PublishRequest: %s", s.SubscriptionID, toJSON(req))
var res *ua.PublishResponse
err := s.c.sendWithTimeout(req, s.publishTimeout(), func(v interface{}) error {
return safeAssign(v, &res)
})
log.Println("PublishResponse:", toJSON(res))
log.Printf("sub %d: publish: PublishResponse: %s", s.SubscriptionID, toJSON(res))
return res, err
}

Expand Down

0 comments on commit 9ad6f4c

Please sign in to comment.