diff --git a/android/app/src/main/java/com/rusefi/app/AndroidSerial.java b/android/app/src/main/java/com/rusefi/app/AndroidSerial.java index fe3f243bf5..f3742b1dfd 100644 --- a/android/app/src/main/java/com/rusefi/app/AndroidSerial.java +++ b/android/app/src/main/java/com/rusefi/app/AndroidSerial.java @@ -34,7 +34,12 @@ public class AndroidSerial implements IoStream { public AndroidSerial(UsbSerialPort usbSerialPort, Logger logger) { this.usbSerialPort = usbSerialPort; - dataBuffer = IncomingDataBuffer.createDataBuffer(this, logger); + dataBuffer = IncomingDataBuffer.createDataBuffer("", this, logger); + } + + @Override + public String getLoggingPrefix() { + return ""; } @Override @@ -45,7 +50,7 @@ public class AndroidSerial implements IoStream { @Override public void setInputListener(DataListener listener) { ByteReader reader = buffer -> usbSerialPort.read(buffer, 5000); - ByteReader.runReaderLoop(listener, reader, Logger.CONSOLE); + ByteReader.runReaderLoop("", listener, reader, Logger.CONSOLE); } @Override diff --git a/java_console/io/src/main/java/com/rusefi/io/ByteReader.java b/java_console/io/src/main/java/com/rusefi/io/ByteReader.java index ecec38c3c8..1eea6bdf02 100644 --- a/java_console/io/src/main/java/com/rusefi/io/ByteReader.java +++ b/java_console/io/src/main/java/com/rusefi/io/ByteReader.java @@ -9,7 +9,7 @@ import java.util.concurrent.Executor; import java.util.concurrent.Executors; public interface ByteReader { - static void runReaderLoop(DataListener listener, ByteReader reader, Logger logger) { + static void runReaderLoop(String loggingPrefix, DataListener listener, ByteReader reader, Logger logger) { /** * Threading of the whole input/output does not look healthy at all! * @@ -24,7 +24,7 @@ public interface ByteReader { threadExecutor.execute(() -> { Thread.currentThread().setName("TCP connector loop"); - logger.info("Running TCP connection loop"); + logger.info(loggingPrefix + "Running TCP connection loop"); byte inputBuffer[] = new byte[256]; while (true) { diff --git a/java_console/io/src/main/java/com/rusefi/io/tcp/TcpIoStream.java b/java_console/io/src/main/java/com/rusefi/io/tcp/TcpIoStream.java index ab5548daca..e0d71c23a8 100644 --- a/java_console/io/src/main/java/com/rusefi/io/tcp/TcpIoStream.java +++ b/java_console/io/src/main/java/com/rusefi/io/tcp/TcpIoStream.java @@ -66,7 +66,7 @@ public class TcpIoStream implements IoStream { @Override public void setInputListener(final DataListener listener) { - ByteReader.runReaderLoop(listener, input::read, logger); + ByteReader.runReaderLoop(loggingPrefix, listener, input::read, logger); } @Override