Improve logging format in `messageProcessor.handleMessages`

This commit is contained in:
Pedro Pombeiro 2019-12-17 21:51:01 +01:00 committed by Pedro Pombeiro
parent 7f11030896
commit a5cf17cf4b
2 changed files with 2 additions and 2 deletions

View File

@ -240,7 +240,7 @@ func (p *messageProcessor) processPairMessage(m v1protocol.PairMessage) error {
// It returns an error only if the processing of required steps failed.
func (p *messageProcessor) handleMessages(shhMessage *types.Message, applicationLayer bool) ([]*v1protocol.StatusMessage, error) {
logger := p.logger.With(zap.String("site", "handleMessages"))
hlogger := logger.With(zap.Binary("hash", shhMessage.Hash))
hlogger := logger.With(zap.ByteString("hash", shhMessage.Hash))
var statusMessage v1protocol.StatusMessage
err := statusMessage.HandleTransport(shhMessage)

View File

@ -240,7 +240,7 @@ func (p *messageProcessor) processPairMessage(m v1protocol.PairMessage) error {
// It returns an error only if the processing of required steps failed.
func (p *messageProcessor) handleMessages(shhMessage *types.Message, applicationLayer bool) ([]*v1protocol.StatusMessage, error) {
logger := p.logger.With(zap.String("site", "handleMessages"))
hlogger := logger.With(zap.Binary("hash", shhMessage.Hash))
hlogger := logger.With(zap.ByteString("hash", shhMessage.Hash))
var statusMessage v1protocol.StatusMessage
err := statusMessage.HandleTransport(shhMessage)