Drop newline in the activity indicator

The "." character is printed on a new line every 2s to indicate that the discovery process is running. However, using a new line unnecessary floods the output log; switch to printing "." without a newline, keeping the activity indicator while also drastically reducing the number of lines in the output log.
This commit is contained in:
Adriano Cunha
2024-04-26 08:24:55 -07:00
committed by GitHub
parent 23f765371b
commit 6b5026dcf1
+1 -1
View File
@@ -34,7 +34,7 @@ export const discoverDevices = (debug: boolean, discovery_ip: string): EventEmit
let buf = create_LanSearch();
setInterval(() => {
console.log(".");
process.stdout.write(".");
sock.send(new Uint8Array(buf.buffer), SEND_PORT, discovery_ip);
}, 2000);
sock.send(new Uint8Array(buf.buffer), SEND_PORT, discovery_ip);