Skip to content

Commit

Permalink
binarylog: Don't continue after failing to marshal the proto
Browse files Browse the repository at this point in the history
and log the error as an Error rather than Info
  • Loading branch information
Jille committed Jul 8, 2021
1 parent 91e0aeb commit e5d747d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/binarylog/sink.go
Expand Up @@ -69,7 +69,8 @@ type writerSink struct {
func (ws *writerSink) Write(e *pb.GrpcLogEntry) error {
b, err := proto.Marshal(e)
if err != nil {
grpclogLogger.Infof("binary logging: failed to marshal proto message: %v", err)
grpclogLogger.Errorf("binary logging: failed to marshal proto message: %v", err)
return err
}
hdr := make([]byte, 4)
binary.BigEndian.PutUint32(hdr, uint32(len(b)))
Expand Down

0 comments on commit e5d747d

Please sign in to comment.