Skip to content

Commit 25ef948

Browse files
committed
no hide the exceptions being uncaught!
1 parent c802de4 commit 25ef948

File tree

1 file changed

+2
-2
lines changed
  • src/main/java/com/neuronrobotics/sdk/common

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,8 @@ private void add(String message, int importance) {
169169
//messages.add(m);
170170

171171

172-
if( systemprint) {
172+
if( systemprint && log==null) {
173173
outStream.println(m.toString());
174-
errStream.println(m);
175174
}
176175

177176

@@ -473,6 +472,7 @@ public void write(int b) throws IOException {
473472
if (text != null && text.length() > 0){
474473
//Files.writeString(logfile.toPath(), text, StandardCharsets.UTF_8, StandardOpenOption.APPEND); // java 11+
475474
Files.write(logfile.toPath(), text.getBytes(StandardCharsets.UTF_8), StandardOpenOption.APPEND);
475+
errStream.println(text);
476476
}
477477
text = null;
478478
} catch (Exception e) {

0 commit comments

Comments
 (0)