Skip to content

Commit

Permalink
Remove newlines when logging a message, to keep it intact and properl…
Browse files Browse the repository at this point in the history
…y associated with its level
  • Loading branch information
weisenje committed Apr 4, 2023
1 parent 7bc95ae commit 3b364f5
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public static String getMessage(String line) {

// log the message
private void log(String s, Levels level) {
s = s.replaceAll("\n", " "); // remove newlines, to keep the message intact and associated with its level
printWriter.println(level.name() + ": " + s);
printWriter.flush();
}
Expand Down

0 comments on commit 3b364f5

Please sign in to comment.