wolfstudy opened a new issue #264:
URL: https://github.com/apache/pulsar-client-go/issues/264


   Currently, there are some inconsistencies in the handling of errors. In 
order to ensure the structured output of the log, we should use withError() 
instead of Error().
   
   E.g:
   
   ```
   p.log.WithField("size", len(msg.Payload)).
        WithField("sequenceID", sequenceID).
        WithField("properties", msg.Properties).
        Error("unable to add message to batch")
   ```
   
   ```
   if err != nil {
        log.WithError(err).Error("Failed to parse service URL")
        return nil, newError(ResultInvalidConfiguration, "Invalid service URL")
   }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to