Skip to content

Commit 3c4c485

Browse files
committed
Update log file format, add line spacing and group messages
Update log file format, add line spacing and group messages
1 parent 2956ed0 commit 3c4c485

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • src/main/java/com/neuronrobotics/sdk/common

src/main/java/com/neuronrobotics/sdk/common/Log.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public class Log {
9797
*/
9898
private Log() {
9999
// private for singleton pattern
100-
add(SDKBuildInfo.getSDKVersionString(), INFO);
100+
// add(SDKBuildInfo.getSDKVersionString(), INFO);
101101
}
102102

103103
/**
@@ -383,10 +383,10 @@ public String toString() {
383383
// First logfile line
384384
if (lastCallingClass.isEmpty()) {
385385

386-
lastCallingClass = "\n======== [" + dateFormat.format(datetime) + "] " + message + " ========";
386+
lastCallingClass = "======== [" + dateFormat.format(datetime) + "] " + message + " ========";
387387
dateFormat = new SimpleDateFormat("HH:mm:ss.SS");
388388

389-
return lastCallingClass;
389+
return lastCallingClass.toString();
390390
}
391391

392392
if (lastCallingClass.equals(getImportance(importance) + " " + callingClass))
@@ -515,6 +515,7 @@ public void write(int b) throws IOException {
515515
}
516516
});
517517
instance.logFileThread.start();
518+
info(SDKBuildInfo.getSDKVersionString());
518519
}
519520

520521
public static void flush() {

0 commit comments

Comments
 (0)