Improve logging

This commit is contained in:
Melora Hugues 2023-08-13 22:33:57 +02:00
parent 99f67a7e79
commit 016dc7fe5b

View file

@ -120,6 +120,7 @@ func (l *UDPListener) listen() (*udpMessage, error) {
return nil, fmt.Errorf("UDP packet too big (%d/%d)", n, bufferLength)
}
l.log.Debugf("Parsing UDP message %q", bytes.Trim(buffer, "\x00"))
parsedMsg, err := bootprotocol.MessageFromBytes(bytes.Trim(buffer, "\x00"))
if err != nil {
return nil, fmt.Errorf("failed to parse message: %w", err)