Use OS independent double line breaks for better readability

This commit is contained in:
chimp1984 2021-01-05 22:20:09 -05:00
parent 3fa22427c7
commit 347e68004c
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3

View File

@ -73,13 +73,15 @@ public class Statistic {
// We log statistics every minute
UserThread.runPeriodically(() -> {
log.info("Network statistics:\n" +
"Bytes sent: {} kb;\n" +
"Number of sent messages/Sent messages: {} / {};\n" +
"Number of sent messages per sec: {};\n" +
"Bytes received: {} kb\n" +
"Number of received messages/Received messages: {} / {};\n" +
"Number of received messages per sec: {};",
String ls = System.lineSeparator();
String doubleLs = ls + ls;
log.info("Network statistics:" + doubleLs +
"Bytes sent: {} kb;" + doubleLs +
"Number of sent messages/Sent messages: {} / {};" + doubleLs +
"Number of sent messages per sec: {};" + doubleLs +
"Bytes received: {} kb" + doubleLs +
"Number of received messages/Received messages: {} / {};" + doubleLs +
"Number of received messages per sec: {};" + ls,
totalSentBytes.get() / 1024d,
numTotalSentMessages.get(), totalSentMessages,
numTotalSentMessagesPerSec.get(),