replacing unterminated binary data with warning log message

This commit is contained in:
Fredrik Osterlind 2011-02-22 20:25:45 +01:00
parent 990edbe32d
commit ac30923990

View File

@ -346,7 +346,10 @@ public abstract class SerialUI extends Log implements SerialPort {
} else { } else {
newMessage.append((char) data); newMessage.append((char) data);
if (newMessage.length() > MAX_LENGTH) { if (newMessage.length() > MAX_LENGTH) {
logger.warn("Dropping too large log message (>" + MAX_LENGTH + " bytes)."); /*logger.warn("Dropping too large log message (>" + MAX_LENGTH + " bytes).");*/
lastLogMessage = "# [1024 bytes binary data]";
this.setChanged();
this.notifyObservers(getMote());
newMessage.setLength(0); newMessage.setLength(0);
} }
} }